dacia121
04-29-2009, 06:28 PM
1) Script Title: Ultimate Fade-in slideshow (v1.51)
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm
3) Describe problem: No problem, rather a feature addition/modification
I absolutely LOVE this slideshow. I recently had someone ask me to figure out how to make a particular image in the show start and/or stop displaying as of a specific date.
I saw the thread on changing out the entire image set based on a particular date but do not know enough about JavaScript to make it work for just one of the images.
Is the following code a good starting point? If so, how can I complete the implementation? If not, what would work better?
function autoExpire(){
var expire_date=new Date('+this.theimages[picindex][3]+'); //adds the ability to put the desired date next to the target for each image
var currentTime = new Date();
var month = currentTime.getMonth() + 1;
var day = currentTime.getDate();
var year = currentTime.getFullYear();
var current_date = new Date(month +'/' + day + '/' + year);
if (current_date>=expire_date){
//what to do here???
Thanks!
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm
3) Describe problem: No problem, rather a feature addition/modification
I absolutely LOVE this slideshow. I recently had someone ask me to figure out how to make a particular image in the show start and/or stop displaying as of a specific date.
I saw the thread on changing out the entire image set based on a particular date but do not know enough about JavaScript to make it work for just one of the images.
Is the following code a good starting point? If so, how can I complete the implementation? If not, what would work better?
function autoExpire(){
var expire_date=new Date('+this.theimages[picindex][3]+'); //adds the ability to put the desired date next to the target for each image
var currentTime = new Date();
var month = currentTime.getMonth() + 1;
var day = currentTime.getDate();
var year = currentTime.getFullYear();
var current_date = new Date(month +'/' + day + '/' + year);
if (current_date>=expire_date){
//what to do here???
Thanks!