Click to See Complete Forum and Search --> : Testing for, and Loading, Frames onLoad


Grunty
03-24-2003, 08:06 AM
Hello,

My website consists of a top frame for a navigation bar and a bottom frame for the document window. Some of the links in the top menu load another frameset in the bottom window giving a sub-menu in the left and document in the right.

I am in the process of creating a search engine (using 3rd party software, I am no good at doing this sort of stuff by myself). When the search produces a link to a page that would normally have a submenu in the right-hand frame, I would like to have that frameset and menu loaded with the correct document.

I suppose that I would need some sort of routine in the document page to test for the existence of a frameset and load it if it isn't there.

I hope all this makes sense

Can anyone help with the code for this?

Thanks

gil davis
03-24-2003, 08:21 AM
Most scripts for frame enforcement either break out of a frame or force the top-most window to load the correct frameset, mainly because you can only detect the presence of frames, not whether you are in the correct frame or not.

You could embed something in the pages that would indicate it's desired frameset page, and the search-engine part of your plan could possibly fish it out. However, if the pages are not in the same domain, you will not be able to access them for security reasons.