Hello.
I created an homepage with 3 frames:topFrame,topFrame1 and mainFrame.
In topFrame1 I have a button.gif.
Can I change the content in topFrame1 and in mainFrame when I click it?
I appreciate any help here! Thanks!
There are two basic techniques for updating multiple frames with a single link: The HTML-based technique links to a new frameset document that specifies the new combination of frames. The JavaScript-based solution uses the onClick attribute of the link to update the additional frame (or frames).
The HTML-based technique can link to a new frameset document with TARGET="_top" (replacing the entire frameset), but there is an alternative if the frames to be updated are part of a nested frameset. In the initial frameset document, use a secondary frameset document to define the nested frameset. For example:
</FRAMESET>
A link can now use TARGET="Display" to replace simultaneously all the frames defined by frameset2.html.
The JavaScript-based solution uses the onClick attribute of the link to perform the secondary update. For example:
<A HREF="URL1" TARGET=Frame1
onClick="top.Frame2.location='URL2';">Update frames</A>
The link will update Frame1 with URL1 normally. If the reader's browser supports JavaScript (and has it enabled), then Frame2 will also be updated (with URL2). Ya' Gotta Love It!X-)
Thank you TulsaJeff.
I used your JavaScript based solution and it`works.
Now I have a problem with back button of IE.
I click my button.gif and I change the content in two frames.To return to my home clicking the back button I have to press it 2 times.
A first time to restore the topFrame1.
A second time to restore the mainFrame.
just place the code in the properties panel just as if it was a normal link.
You can even copy and paste it in.
Make some text that says "go back" or whatever you want it to say... highlight the text and paste the code in the link area of the properties panel.
hit F12 to test the page in a browser. Ya' Gotta Love It!X-)
1)I made a text `GO BACK` in the updated page in mainFrame.
2)I highlighted the text and I linked it with your code.
Result:
1)I click on button.gif and I change content in topFrame1 and in mainFrame.In my new page (in mainFrame) there is the text "GO BACK".I click it to return in my first homepage but it doesn`t work.
ABOUT BROSWER (Explorer)
Back button (broswer bar)update one frame.
Two clicks to return to my homepage.
Sorry...I wasn't sure if that was netscape only or if it would actually work in IE.
javascript:history.back() ... I do not know if you can put -2 between the perenthesis like in netscape or not is the IE script of choice I beleive. I am not the javascript guru actually. I use a little bit but with lots of trial and error.
You might try posting in the javascript forum also and see if you get any hits. Them guys are pretty good I hear. Ya' Gotta Love It!X-)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.