How do I replace the frameset from JavaScript, say to go from 4 to 3 frames?

Vikram Lele

You can get access to the document of the top window using top.document, and write a new frameset HTML using top.document.writeln.

Lets say initially there were 4 frames in the frameset. You get URL corresponding to each frame using

URL0 = top.frames[0].document.URL;
URL1 = top.frames[1].document.URL;
URL2 = top.frames[2].document.URL;
URL3 = top.frames[3].document.URL;
These can then be used to create a new frameset HTML which can be written to the top level window using top.document.writeln.

For more discussion on this, refer to http://developer.netscape.com/docs/manuals/js/client/jsguide/ and http://developer.netscape.com/docs/manuals/js/client/jsref/.

Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact