Forum Moderators: open
Hello, I am trying to seat an externally accessed orphan iframe into it's correct frameset.
I have read [netmechanic.com...]
and also [webmasterworld.com...]
I have correctly added the appropriate script into all orphaned pages and created my master.html file, but neither seems to work in practise, the most common error being an empty frame "<html></html>" which I guess would mean that it's not picking up the contentURL.
My page ("master.html") had this on HEAD:
<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
origURL = parent.document.URL
contentURL = origURL.substring(origURL.indexOf('?')+1, origURL.length)
<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
document.write('<iframe src="' + contentURL + '" width="200" height="150" title="index.html"></iframe>')
And the orphaned pages with this no the HEAD
<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"> passpage = document.URL
if (top.location == self.location)
top.location.href="master.html?" + passpage
But don't work...what i am doing worng?
I don't understand something that i read here somwhere, on the master page on ( document.write('<iframe src="' + contentURL + '" width="200" height="150" title="index.html"></iframe>') ) the title part is to put what? The name of the page wher i want to my orphanate page open?
P.s: I am mother lang is not english, so soory if i write with mistakes.
Replace
if (top.location == self.location) top.location.href="master.html?" + passpage
with
if (top.location == self.location) top.location.replace("master.html?" + passpage)
or
if (top == self) top.location.replace("master.html?" + passpage)
You could also use
contentURL = parent.location.search.substring(1);
Kaled.