HighDots Forums  

Re: use different images at different time

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Re: use different images at different time in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Maneet Puri
 
Posts: n/a

Default Re: use different images at different time - 04-01-2009 , 08:33 AM






Hi,

Its simple, fetch the current time in 24 hours format and put cheks like show image 1 if its between 5 to 17, otherwise show Image 2.

I hope this helps.

Cheers,

~Maneet

Reply With Quote
  #2  
Old   
Michael White
 
Posts: n/a

Default Re: use different images at different time - 04-01-2009 , 10:33 AM






Maneet Puri wrote:
Quote:
Hi,

Its simple, fetch the current time in 24 hours format and put cheks like show image 1 if its between 5 to 17, otherwise show Image 2.

I hope this helps.

Cheers,

~Maneet
script
onload=function(){
H=new Date().getHours();
document.Z.src=(H>4 && H<18)?"day.gif":"night.gif";

}
</script>
<img src="day.gif" name="Z">

Mick


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.