Click to See Complete Forum and Search --> : parent.doc..... HELPPPPP. Plz
lynxus
07-30-2003, 11:15 AM
Hi guys, Lemme quickly explain.
I have this code in a frame called switch.
And a button when clicked does this action.
parent.PANEL.document.location.href="adminpanel.html";
Works fine inside a frame.
BUT how can i get this to also work outsite, EG in a small popup box.
Basically so this button can be floated above the other page.
if i run this code in a popup page it just says Errors on page.
Please any ideas how i can get the popped up page to communicate with the page behind it..
Kind regards
Graham
You need to use window.opener to communicate with the page that opened the popup.
lynxus
07-30-2003, 11:22 AM
how is this done?
I'm assuming you are in frames from your other example, so:
window.opener.top.framename.document.location.href = "http://www.webdevfaqs.com";
lynxus
07-30-2003, 11:26 AM
Erm,
Basically
i have a button that will open a new window with another load of buttons in. Lets call ( Settings.html )
inside settings.html will be a button that does this
parent.PANEL.document.location.href="adminpanel.html";
BUT that code only seems to work IF it is run inside the window behind the new popped up window.
the new Floating settings.html window shows as errors on it.
And doesnt do what it would normally do if it was run from inside the framed page. Lets call the framed page ( Login.html )
if yano what i mean?
Nope... ;)
Do you have a link?
lynxus
07-30-2003, 11:31 AM
Ok
this is teh page that will pop up.
http://qforum.mine.nu:9910/nd2/extrapanelout.html
THIS PAGE IS WHAT IM HAVING PROBS WITH.
IT DOESNT DO THE SAME AS WHAT IT WOULD NORMALLY DO IN LOGIN.HTML (BELOW)
this is teh page that its normally in.
http://qforum.mine.nu:9910/nd2/login.html
this is the page that the login.html refers to.
http://qforum.mine.nu:9910/nd2/switch.html
Basically , Any functions running outsite the login.html browser down work and cant comm with the login.html , So buttons outside it, Dont work..
Try replacing all the parent.PANEL.document.location.href with window.opener.top.PANEL.document.location.href
lynxus
07-30-2003, 11:40 AM
Ok that seems to work..
I might require more help soon.
Thanks. Lemme try summat now :)
Thanks again Graham
lynxus
07-30-2003, 11:42 AM
Humm it still seems to show errors on the page,
And some stuff still doesnt work.
lynxus
07-30-2003, 11:44 AM
as you can see now on teh popup page, I have the admin panel,
Witch is what im actually trying to get working in a popup.
And it doesnt seem to like any of teh command,
And doesnt actually do what it would normally do in teh login.html page.
lynxus
07-30-2003, 11:50 AM
infact, Not to worrie, I think ill scrap this idea ;)