AgaBoogaBoo
02-23-2003, 09:04 PM
I have some code for displaying the day's comics. Here it is:
<script language="JavaScript"><!--
var today=new Date();var thismonth=today.getMonth()+1;var thisyear=today.getYear();var thisday=today.getDate();
function comicwrite(year,month,day,name) {
var tempmonth;var shortyear;
if(year<1900) {year=year+1900;}
if(year>2000) {shortyear ="0"+(year-2000);}
else {shortyear=""+(year-1900);}
var montharray=new Array(31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
if(month>1) {tempmonth=month-1;} else {tempmonth=12;}
var maxdays=montharray[tempmonth-1];
if(tempmonth==2) {if(year % 100 == 0) {if(year % 400 == 0) { maxdays=29; }}
else {if((year%4)==0) {maxdays=29;}}}
if(day>1) {day--;}
else {if(month>1) {month--;day=maxdays;} else {month=12;year--;day=maxdays;}}
if(day < 10) {day ="0"+day;}
else {day = ""+day;}
if(month < 10) {month="0"+month;}
else {month = ""+month;}
document.write("<p><a href=http://images.ucomics.com/comics/"+name+"/"+year+"/"+name+shortyear+month+day+".gif target=_blank><img src=http://images.ucomics.com/comics/"+name+"/"+year+"/"+name+shortyear+month+day+".gif border=0></a></p>");
}
comicwrite(thisyear,thismonth,thisday,"ga");
comicwrite(thisyear,thismonth,thisday,"zi");
// --></script>
What I want to do is, take those comic strips, and add them to a slideshow on the same page. I'm having a little trouble doing that, but I found a good slideshow script at dynamic drive: http://dynamicdrive.com/dynamicindex14/image4.htm
Any slideshow script is fine but I need it to work with the comic script above. If you decide to show me how to do it with another script, please make sure its nothing fancy, either like the one at the link or one where it just simply changes.
<script language="JavaScript"><!--
var today=new Date();var thismonth=today.getMonth()+1;var thisyear=today.getYear();var thisday=today.getDate();
function comicwrite(year,month,day,name) {
var tempmonth;var shortyear;
if(year<1900) {year=year+1900;}
if(year>2000) {shortyear ="0"+(year-2000);}
else {shortyear=""+(year-1900);}
var montharray=new Array(31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
if(month>1) {tempmonth=month-1;} else {tempmonth=12;}
var maxdays=montharray[tempmonth-1];
if(tempmonth==2) {if(year % 100 == 0) {if(year % 400 == 0) { maxdays=29; }}
else {if((year%4)==0) {maxdays=29;}}}
if(day>1) {day--;}
else {if(month>1) {month--;day=maxdays;} else {month=12;year--;day=maxdays;}}
if(day < 10) {day ="0"+day;}
else {day = ""+day;}
if(month < 10) {month="0"+month;}
else {month = ""+month;}
document.write("<p><a href=http://images.ucomics.com/comics/"+name+"/"+year+"/"+name+shortyear+month+day+".gif target=_blank><img src=http://images.ucomics.com/comics/"+name+"/"+year+"/"+name+shortyear+month+day+".gif border=0></a></p>");
}
comicwrite(thisyear,thismonth,thisday,"ga");
comicwrite(thisyear,thismonth,thisday,"zi");
// --></script>
What I want to do is, take those comic strips, and add them to a slideshow on the same page. I'm having a little trouble doing that, but I found a good slideshow script at dynamic drive: http://dynamicdrive.com/dynamicindex14/image4.htm
Any slideshow script is fine but I need it to work with the comic script above. If you decide to show me how to do it with another script, please make sure its nothing fancy, either like the one at the link or one where it just simply changes.