In the page that opens the window, make sure you explicitly define a
relationship between the "parent" window and the "child" window. I'm pretty
sure that there is not any implicitly defined relationship between the two,
but I could be wrong. In any case, here's how I did it from the parent
side:
Parent.html
<script language = javascript >
function launchwin( link, name, width, height ) {
var top;
var left;
winOptions = 'scrollbars=no,menubar=no,statusbar=no,toolbar=no';
winOpt = 'width=' + width + ',height=' + height + ',' + winOptions;
var newWin = window.open(link,name,winOpt);
newWin.opener = self;
newWin.focus();
}
</script>
<html>
<head>
</head>
<body>
<form name="form1">
<input type="text" value="blah" name="ITEM_ID">
</form>
</body>
</html>
Then, in the "child" I just do the following:
Child.html
<script language = javascript >
alert( opener.document.forms.form1.ITEM_ID.value );
</script>
-----Original Message-----
From: Owens>,Howard [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 12, 2003 4:58 PM
To: CF-Talk
Subject: OT: Javascript -- Reading FORM value from Popper
I have a form, and with the form, I have a link that when clicked, spawns a
pop-up window.
>From within that popper, I want to read a form value ...
Shouldn't this:
alert(parent.form1.ITEM_ID.value);
Give me that value?
Obviously, the answer is no, because it's not working for me.
So the question is, How?
H.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Owens
Internet Operations Coordinator
InsideVC.com/Ventura County Star
[EMAIL PROTECTED]
AIM: GoCatGo1956
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4