faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

4 of 10 people (40%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

how to make the browser's back button reload 2 frames at same time?

Apr 6th, 2008 19:34
ha mo, Colin Fraser, Vanessa Rocha,


You cannot. The browser back button does not come into the domain of 
Javascript, it is not a funtion or method accessible to scripting.
However, that does not mean that you cannot get a browser to do what you
want it to do. 
Try :
<script> <!--//
if (document.images)
    location.replace('http://www.ISPhostname.com/path/framePage.htm');
else
    location.href = 'framePage.htm';
//--></script>
Why would you want to use an absolute reference? Simple. Many versions
of Opera will not work without it, and Opera supports the images object.
The replace() function changes the history object. 
You may, as an alternate use the history object, something like : 
<script>
   window.history[0] = 'myFramespage.htm'
</script>
But this, I understand, does not work in earlier versions of IE.
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com