Jacque Scott
asked on
Get value from parent window through javascript
I am opening a popup window and I want to display the contents of a hidden field from the parent window into the child window. My code is not displaying the data. Here is what I have in the child window :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="description" content="Download .../>
<meta name="keywords" content="independent film,..." />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>IR.net: Thank you for your purchase</title>
</head>
<body bgColor=White>
<table width="700" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align=right>
<input name='button' type='button' class='SubmitButton' id='button' value='Print' onClick="window.print()"/>
</td>
</tr>
<tr>
<td>
<SCRIPT type="text/javascript">
var Voucher = window.opener.getElementById('Purchasebody').value;
document.write(Voucher);
</Script>
</td>
</tr>
</table>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.