Frames within Frames - help!

C

contrapositive

As a rule, I don't like frames but I'm stuck supporting a web that uses
them. I have a page, default.asp, that has a header and body frame: "fHead"
and "fBody". What I want to do is to prevent default.asp from ever loading
itself into "fBody". Some users still have code that causes this behavior.

So how, using javascript , can I do something to the effect of: "If
default.asp tries to load default.asp (itself) into fBody, then reload the
top-level browser window with what fBody is trying to load."

Make sense? Any thoughts? Thanks!

-jk

PS: All users have IE5 or greater, our corporate standard.
PPS: If there's a better way using ASP, I'm open to ideas there too (wrong
group, I know).
 
R

Randy Webb

contrapositive said:
As a rule, I don't like frames but I'm stuck supporting a web that uses
them. I have a page, default.asp, that has a header and body frame: "fHead"
and "fBody". What I want to do is to prevent default.asp from ever loading
itself into "fBody". Some users still have code that causes this behavior.

So how, using javascript , can I do something to the effect of: "If
default.asp tries to load default.asp (itself) into fBody, then reload the
top-level browser window with what fBody is trying to load."

Make sense? Any thoughts? Thanks!

-jk

PS: All users have IE5 or greater, our corporate standard.
PPS: If there's a better way using ASP, I'm open to ideas there too (wrong
group, I know).

In default.asp check to see if it has a parent.window property. Or,
parent.frame(s). If it does, then you set
window.location.href='default.asp'. Basically, you put "frame busting"
script into default.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top