|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I am using the following to update 3 frames when a button is pressed:
<script language="JavaScript"> <!-- function load(){ top.data.location="login.html" top.menu.location="menu_selected.html" top.collage.location="collage_selected.html" } //--> </script> It works OK, but when the user presses the back-button on his browser he needs to press 3 times before all 3 frames have been updated with the old value. Is there any way to make one press of the back-button update all 3 frames to the old pages? |
|
#2
|
|||
|
|||
|
In order to prevent this, you have to use the "replace" method to fill the other frames apart from the main/data one...
frames[name].location.replace('url') replaces the content of a given frame with the new url without adding to the history list. I think the best way - at least that's how I do it - to navigate in a framed site is to link only between the content frames of each page and let every page reload its own navigational frames &cetera "on load" by using the "replace" method. If you do so, the back/forward buttons are fully operational regardless of the numer of frames used in you site. Just modify you script like this: <script language="JavaScript"> <!-- function load(){ top.data.location.replace("login.html"); top.menu.location.replace("menu_selected.html"); top.collage.location.replace("collage_selected.html"); } //--> </script> I hope this helps... |
|
#3
|
|||
|
|||
|
Hmm question?
Does this code go into your frameset? and how do you initialize it. Is it an onload in the body tag? also, if you are using top.name.location.replace(""); is that the same as name.location.replace(""); Thank, ray |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Back-button after loading multiple frames |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|