hi ppl, have a lil problem, dno how to go abt coding my idea:
i have a night day script and want to add a different imagemap to the frontpage of my site depending if it’s night or day? dno if this is possible the way i’m thinkin of it in my mind as the whole screen wud just be one pic with a tiny bit of txt sayin click where-ever.
[CODE]<script language=”JavaScript”>
<!–
var now = new Date( );
var hour = now.getHours( );
if (hour >= 4 && hour <= 16) {
document.bgColor = “#F00000”;
document.fgColor = “#000004”;
document.write(“<img src=”IRISHMAP.jpg”
width=”302″ height=”320″
usemap=”#IRISHMAP”>
<map id=”IRISHMAP” name=”IRISHMAP”>
<AREA SHAPE=”rect” HREF=”SURFPROJECT3.html” COORDS=”75,64,169,100″ ALT=””>
<AREA SHAPE=”rect” HREF=”SURFPROJECT5.html” COORDS=”18,92,86,125″ ALT=””>
<AREA SHAPE=”rect” HREF=”SURFPROJECT4.html” COORDS=”11,190,93,211″ ALT=””>
</MAP>”); [COLOR=”Red”]<< i know there’s a prob with this whole part of code as it’s probs not possible to do it this way,[/COLOR]
document.write(“day”);
}
else {
//document.write(“<img insert image map night here>”);
document.write(“lol”);
}
ne hlp wud b appreciated ? plz dont tell me to research laws on javascript lol. am workin on it atm too