Forum Moderators: open

Message Too Old, No Replies

Changing image

image dispays depending on time of day

         

smokeyb

11:46 am on Oct 6, 2003 (gmt 0)

10+ Year Member



I have been looking through some of the other forums and stumbled across this post (http://www.webmasterworld.com/forum46/448.htm), I would like to do this on my baby's website (nothing commercial) and would like to understand the principles. Why is the URL in the "image source" code? can you not test this locally (javascript illiterate) and how would you apply it to a specific image? Sorry for my wandering in the wilderness.

benihana

12:29 pm on Oct 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



the url in the source code is an absolute reference to the image's source - you could do the same thing with a relative link e.g. <im src="/images/example.jpg">

to apply it to a specific image you just need to change the path to one that exists in your site driectory structure.
Theres no reason why you couldnt test locally..

ben

smokeyb

6:26 pm on Oct 6, 2003 (gmt 0)

10+ Year Member



Thanks, that seems simple enough. What would happen if I were to link the image to a larger version? would it cause any errors? and how then would I be able to do that with all the images for different times (positioning being the goal), do I insert each image into the page in the and add the link and then leave the script to do it's thing.. that wouldn't work thinking about it, I suppose you'd have to do it in the code only and can you then specify it's position as well? and in the other post the times specified are 12, 16 and 20hrs does it naturally assume the time in between (13, 14 etc) default to the lowest time? It's bloody freezing out here in the wilderness, can someone get me inside.
Thanks