View Full Version : JavaScript Rollover Button - How Can I...

12-28-2005, 09:38 PM
I'm new to JavaScript and I am trying to figure out how to do the following...
I'm using a template for a website with rollover navagation. After a nav button is pressed I want there to be an image swap showing that you are currently viewing (for example) the "about us page". How do I do this with JavaScript?

Thanks for any help you can offer.

12-28-2005, 11:01 PM
Can you post a link to your site please?

12-29-2005, 12:53 AM
The link to the site is http://grayscrossinghome.typetmedia.com

12-29-2005, 01:41 AM
Its only 5 pages why not just change the image manually for each page?

12-29-2005, 02:21 AM
Eventually I'll need to know so I might as well try to learn it now. It would be a good thing to know for when I end up working on a site that has much more content.

12-29-2005, 05:09 AM
I'm not too sure how efficient this would be if done in javascript, you would need to check what page was loaded and then spit out the correct image. Your script could be come huge if you have a lot of pages. Read this little tut (http://bonrouge.com/br.php?page=current).