parent to chlid window

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

parent to chlid window

Post by qads »

Hi,

i am trying to get the values from a parent window, but no luck, i dont know why it wont work :?.

parent.htm

Code: Select all

<form name="form" action="&#123;SELF&#125;" method="post">
<input type="text" name="welcome">
<input type="submit" value="Send" name="send">
<input name="pre" type="button" onClick="openit('main.php?mod=promo&file=preview&cid=2&prom=1','child','status=yes,scrollbars=yes,resizable=yes,width=780,height=550')" value="Preview">
</form>
child.htm

Code: Select all

<script language="javascript">
confirm(window.parent.forms&#1111;'form'].welcome.value);
//and...
confirm(window.opener.forms&#1111;'form'].welcome.value);
</script>
any ideas?
thanks
User avatar
Jean-Yves
Forum Contributor
Posts: 148
Joined: Wed Jul 02, 2003 2:13 pm
Location: West Country, UK

Post by Jean-Yves »

I had a related problem, maybe the solution to that can be of some help:

viewtopic.php?t=23581

ie - check the object model: I used opener.document rather than window.parent.
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

your method worked, but i couldt get the line breaks to work, so the text was in huge chunks, now i am useing sessions to move the data around, its working fine.

thanks for your help.
vcsglobal
Forum Newbie
Posts: 1
Joined: Wed Aug 04, 2004 1:35 am

Post by vcsglobal »

iam unable to open a popup window which should not allow "resizable" option. can u provide me help
qads
DevNet Resident
Posts: 1199
Joined: Tue Apr 23, 2002 10:02 am
Location: Brisbane

Post by qads »

you should really post your own topic, but anyways...

http://javascript.internet.com/generato ... indow.html
Post Reply