View Full Version : Changing image in a frame when page loads in another frame

10-17-2006, 12:21 PM
I have a site that is split into 2 frames ("nav" and "content"). The "nav" frame contains images for navigation buttons and the "content" frame is where the site's content loads. The nav buttons all have a simple javascript rollover on them that turns the image from yellow to white when the user rolls over it.

I am trying to find out if when the user clicks a button and the content loads in the "content" frame can the button that has been clicked stay in the rollover state ie: all other buttons are yellow but the clicked button stays white to show that is the page they are on.

Hope this makes sense, thanks in advance for any help people can give!

10-17-2006, 01:02 PM
IF you change them button from mouseoverbuttons to onclick buttons and don't change them back when you onrelease.

10-17-2006, 02:20 PM
Hi, thanks for your reply. Would that not just stop the rollovers working? I still need to keep the rollover happening, but then stop it if the button is clicked. Likewise if another button is then click the first one needs to go back to its original state and have a rollover on it.

10-17-2006, 02:38 PM
Hmmm.. the only way I know that this would work, is if you remove the frames and use the dreamweaver templates instead. Then you can use your server side language available and detect which page you're on and display a different set of code for the nav button for the page you're on.

In PHP it would be something like:
<? if (basename($PHP_SELF)=="products.html"){echo'image.gif';} ?>

Anyone else?