Forum Moderators: open

Message Too Old, No Replies

Check if top frame is right

         

larsfres

6:18 pm on Feb 22, 2005 (gmt 0)



I have a website with frames and lots of people are opening the pages who are supposed to be in frames in fullscreen. So I need a little script that says, if the top frame is not <index.html>, then set top frame to <url>.
Almost like the little framebuster script, which checks if self==parent... or something.

Should be easy, but I have no idea. Anyone?

SpaceFrog

8:40 am on Feb 23, 2005 (gmt 0)

10+ Year Member



you would have to split the url :


if( parent.top.location.href.split("\/")[parent.top.location.href.split("\/").length])!="index.html")#
parent.top.loaction.href=newurl}

not tested but should not be far form the truth ...