View Full Version : Trapping a webpage inside a frame!

03-04-2003, 06:06 PM
Hello All
I need some help with my frames. Im building a website which will only be used on my intranet and not the WWW.

I have a frameset with a mainframe and a left frame. In the mainframe i have a link to a website which will not stay inside the left frame. Is there a script or technique which will assure that anywebsite i visit will stay within that frame.

Normally it wouldnt be a problem but its important that all webpages viewed through my frameset stays within the frame.

I do not wish to use this to trap people using this frame as I mentioned early, this frame is only used on my intranet and is only used by me.

Thankyou in advance.

03-04-2003, 06:28 PM
Sorry no. They probably have something like this in their page:

if (window != top) {

So basically it's on their side and no matter what you do they're going to get their way.

03-04-2003, 06:31 PM
Thankyou for your reply.

Roy Sinclair
03-04-2003, 07:38 PM
Actually there is a technique that'll work for you. Simply disable all scripting (turn off javascript entirely) and their page won't escape from your frame (but any link on the page may still escape your frame when it's clicked).

03-04-2003, 08:49 PM
And in the future try reading our forum rules before you ever create another topic.

Do not crosspost your questions!!