Jump to content
MakeWebGames

Travel Agency question


KDawg08

Recommended Posts

Is there a way i could make it so the picture of the city changes everytime you click one of the buttons for a different location?

basically like this...

Say i was in.... Sydney... When i went to travel agency it would automatically show the sydney image (As it does already standard settings), but when i clicked a button to somewhere else it changes the image to that location (Even before you click travel)

Link to comment
Share on other sites

I haven't tried it myself but I suppose you could. The best way to do this I think would be to use javascript. The problem is that without hitting the travel button the page will not reload so conventional php would be able to do the job. With javascript you would be able load the images when the location is selected by pre loading the images inside hidden divs.

If you dont know much about javascript there should be some scripts on the net that will be able to do this simple task. The link below should be the perfect script for what youa re trying to achieve.

http://www.randomsnippets.com/2008/02/12/how-to-hide-and-show-your-div/

Link to comment
Share on other sites

good point, i see exactly what you're saying. I think i'll leave it alone for now so that it keeps the page loading faster and not slowing it down with images constantly. plus kids that wanna click em alot will put a small load on the site so it's probably best left as is. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...