KDawg08 Posted January 14, 2010 Posted January 14, 2010 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) Quote
Taxed Posted January 14, 2010 Posted January 14, 2010 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/ Quote
KDawg08 Posted January 16, 2010 Author Posted January 16, 2010 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. :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.