Hey all, i have a small iframe with a src attr of a page somewhere else. How can i stop that page from being loaded by itself, like someone typing in the url, and if they do, it will load the main document with the iframe itself?
lemme break this down..
Content
<iframe src=" />
Other stuff
if type in - it should redirect to
Heres what ive done, but doesnt quite work (redirect works, but then the iframe wigs out and reloads over and over and over and over)
page.html
js
body onload
if (parent.location.href=document.location.href) {
//if top url = this url then redirect
parent.location.href=' }
else
{
//must be in the iframe where i want it
label.value = document.write(parent.location.href);
}
thank for any help here.
lemme break this down..
Content
<iframe src=" />
Other stuff
if type in - it should redirect to
Heres what ive done, but doesnt quite work (redirect works, but then the iframe wigs out and reloads over and over and over and over)
page.html
js
body onload
if (parent.location.href=document.location.href) {
//if top url = this url then redirect
parent.location.href=' }
else
{
//must be in the iframe where i want it
label.value = document.write(parent.location.href);
}
thank for any help here.