Page 1 of 1

parent to chlid window

Posted: Sun Aug 01, 2004 9:24 pm
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

Posted: Mon Aug 02, 2004 4:23 am
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.

Posted: Mon Aug 02, 2004 7:18 pm
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.

Posted: Wed Aug 04, 2004 1:35 am
by vcsglobal
iam unable to open a popup window which should not allow "resizable" option. can u provide me help

Posted: Wed Aug 04, 2004 3:23 am
by qads
you should really post your own topic, but anyways...

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