[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
HowToJavaScriptLoadMultipleFramesAndReplaceSameFrame
Create all the pages you need then place this function between script tags in each page that has a side list in another frame. The location object is used to assign a URL to the location property of an object.
Note that frames on the same level of hierarchy can only be accessed through their parent window.
Place this function between script tags in the header pages, and target contents into the relevant frames.
Related threads:
Load pages in frames
Java Script FAQ
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
HowToJavaScriptLoadMultipleFramesAndReplaceSameFrame
How to load multiple frames and replace the same frame as well?
Create a frameset with one horizontal and two vertical frames. The script later will identify the frame by its name attribute.<html> <head> <title>Frameset</title> </head> <frameset rows="10%,*"> <frame name=_h src="header.htm"> <frameset cols="20%,*"> <frame name=_l src="toc.htm"> <frame name=_r src="main.htm"> </frameset> </frameset> </html>
Create all the pages you need then place this function between script tags in each page that has a side list in another frame. The location object is used to assign a URL to the location property of an object.
Note that frames on the same level of hierarchy can only be accessed through their parent window.
function loadTOC()
{
parent._l.location = "toc01.htm";
}Place this function between script tags in the header pages, and target contents into the relevant frames.
function loadH_01()
{
top._h.location = "header_01.htm";
}
function loadH_02()
{
top._h.location = "header_02.htm";
}<a href="main.htm" target="_r">Home</a> <a href="01.htm" target="_r">Main 1</a> <a href="02.htm" target="_r">Main 2</a> <a href="main_01.htm" target="_r" onclick="loadH_01()">Link 1</a> <a href="main_02.htm" target="_r" onclick="loadH_02()">Link 2</a>
Related threads:
Load pages in frames
Java Script FAQ
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
