Click to See Complete Forum and Search --> : Navbar status


learninghtml
07-21-2003, 02:00 PM
Hi,

I have asked this question before and someone did reply, but I didn't understand what they were talking about. I do know some javascript but the code in the navbar (generated by Dreamweaver MX) is way beyond me!

In the framset I have a left frame which is the 'navbar' and a right frame (which shows the content) and a top frame (whole width of page) which holds the title.

Here's what I want to do....

Click a navbar button and the appropriate page loads into the right frame which is fine. But if on the new page there's text link to another page (which is also accessible from the navbar buttons) which loads into the right frame and I click it....

The navbar button doesn't change to show the corresponding button 'down' for the new page, it stays in the state of the last navbar button clicked.

Is there anything I can put in the content page (the page loaded into the right frame) that will force the navbar to change the button images to the correct button 'down' images and change whatever was 'down' previously to 'up'.

Take a look at my site (www.codsalldramaticsociety.co.uk) and click on the venue name on the home page. Then observe that when loaded, the navbar still shows the 'Home' button as 'down'. I want it to go to it's 'up' image and the 'Venues' button to go to it's 'down' image. I would like all pages to be able to do this.

Hope you can understand what I mean and be able to help me.

If you could be quite explicit with your answer as I am definitely not a javascript expert I would be very grateful.

Thanks

arturion
08-17-2003, 04:14 PM
copy all the code between <head> and </head> of the code of the navbar to the notebook and save it as some_name.js then, inside the <head> in the code of the main page, put <script languaje="javascript" src="some_name.js"></script> then, in every <a href> of all pages to appear in the main page, inside the <a> tag, put onClick="MM_nbGroup('');" with the appropiated tags.

for example, in the "ticket reservations" button in the navbar, the code of the <a> says:


<a href="tickets.html" onClick="MM_nbGroup('down','group1','btn_ticketreservations_up','Buttons/btn_ticketreservations_down.gif',1)" ></a></td>

so, in the main page, there is a link to "ticket reservation" inside that <a> tags in the code, put the same code, but reffering to the other frame, using top.leftframe.document...etc