Frames within Frames - help!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • contrapositive

    #1

    Frames within Frames - help!

    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).


  • Randy Webb

    #2
    Re: Frames within Frames - help!

    contrapositive wrote:
    [color=blue]
    > 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).
    >
    >[/color]

    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

    --
    Randy
    comp.lang.javas cript FAQ - http://jibbering.com/faq

    Comment

    Working...