|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi there,
I am designing a web site with two frames. One on top that is used as a navigation bar (top frame - name="navigation"), the other at the bottom that is used for my body text(bottom frame - name="body"). The buttons are on the navigation bar and they are different colours. Each colour is for one subsection of the web site. When people click on a button, I want both frames to change. I use different colour buttons and the top frame and bottom frame should have the same colour - colours that are always changing depending on people choice. How can I make the two frames change simultaneously when I click on a button on the top frame? Thank you for your assistance. Annabelle |
|
#2
|
|||
|
|||
|
Supposing in the navigation frame you have a form frm1 and a button like this:
<input type=button name=btn1 value="Click Me" onclick="javascript:clickMe()"> In the same frame, inside the head tag, place a script tag which must contain the following function: function clickMe(){ top.navigation.document.frm1.submit(); top.body.document.frm2.submit(); } where frm2 is the form from the body frame. If your buttons do nothing more than changing color dynamically on client-side then clickMe function should look like: function clickMe(color){ top.navigation.document.style.backgroundColor = color; top.body.document.style.backgroundColor = color; } Have fun, Dragos |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > change of frames |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|