PDA

View Full Version : using 'break frames' AND 'if not in frame, go to page' on same page?


hypedup.co.uk
09-01-2002, 09:04 AM
im using the following code on all of my pages so that if someone enters them, and havent gone from the start (so therefore dont have all the frames etc), they will get sent back to the index page so that the site looks correctly:
if (window == top) top.location.href = "http://www.hypedup.co.uk"

i also want to put a 'break frames' script on my index page (which is in a frame) but when i try all the ones ive seen on the net, it causes the page not to load at all and you can see it trying to constantly refresh itself all the time. anyone know what i should put?

thanks in advance, paul

joh6nn
09-01-2002, 10:48 AM
to the best of my knowledge, you can't. it requires reading the location of the top object, which can't be done cross browser. all of my attempts, have either resulted in errors ( because i couldn't read top.location ), or have created endless looping.