I have a site which is currently displaying within a frameset (cloaked forwarding of the domain by the domain registrar). For reasons which are too boring to go into, I need certain browsers to take the page out of the frameset to be viewed. (for testing, I'm using IE 5.1)
, but I can't seem to detect whether the page is being displayed within a "parent" window. I've tried the script:
ef == "http://www.skmotorsport.com
ef = "http://www.skperf.com
But it simply didn't work.
I wondered whether I wasn't getting the parent window object properly addressed, so I made a simple test script that would tell me the parent window's URL:
This didn't work either in the frameset context. But it DID work when I right-clicked and opened the frame in a new window.
Bang! Up comes the alert message with the URL.
So then I wondered whether it was because the frame the page was inside was being created by the domain registrar, whether that affected the script. So I created a frameset within my same domain, with the page inside that I'm hoping to "free."
Voila! My alert script worked perfectly, displaying the URL of the page. (the redirect still doesn't, though)
Is this a security issue? You can ONLY reference the frameset's attributes from a page inside it when the page and frameset are within the same domain? (the question at hand)
Is there any other way to do this?