Check this out. I have two test files. One called parent.html and the other called child.html. What the files do is open a pop-up window called child from parent. You can then plug some data into child, hit "send info" and the data the hidden form field should be populated. It's not working however. Here are the files
parent.html
Here is the child:
If i switch the input type to text it picks up the data. If I set it to hidden, it omits it. Any suggestions?
parent.html
Code:
<html>
<head>
<title>Test</title>
<script type="text/javascript">
function OpenWindow(){
var winPop = window.open("child.html","winPop");
}
</script>
</head>
<body>
<form name="form1">
<input type="hidden" name="text1" value="" id="text">
<input type="button" name="button" value="Grab Info"
onclick="OpenWindow()">
</form>
</body>
</html>
Here is the child:
Code:
<html>
<head>
<title>Test</title>
<script type="text/javascript">
function SendInfo(){
var txtVal = document.formPop.textPop.value;
window.opener.document.form1.text1.value = txtVal;
window.close();
}
</script>
</head>
<body>
<form name="formPop">
<input type="text" name="textPop">
<input type="button" name="button" value="Send Info"
onclick="SendInfo()">
</form>
</body>
</html>
If i switch the input type to text it picks up the data. If I set it to hidden, it omits it. Any suggestions?