mravihpcl
11-11-2011, 02:37 PM
This is my script to pass values from parent to popup. I am getting an error [object HTMLInputElement]. Pls help me
<head>
<meta http-equiv="Content-Language" content="en-us">
<script type="text/javascript">
function open_win()
{
var x=document.getElementById('1');
var y=document.getElementById('2');
var mywin=window.open("http://hpcl-4kgt5pwd85/hr/Lists/FormVclr/print.htm");
mywin.document.write(x);
mywin.document.write(y);
}
</script>
</head>
<body>
<form id="100"method="post" action="">
<input name="Text1" id="1" type="text">
<input name="Text2" id="2" type="text"><br>
<input type=button value="Open Window" onclick="open_win()" /></form>
</body>
<head>
<meta http-equiv="Content-Language" content="en-us">
<script type="text/javascript">
function open_win()
{
var x=document.getElementById('1');
var y=document.getElementById('2');
var mywin=window.open("http://hpcl-4kgt5pwd85/hr/Lists/FormVclr/print.htm");
mywin.document.write(x);
mywin.document.write(y);
}
</script>
</head>
<body>
<form id="100"method="post" action="">
<input name="Text1" id="1" type="text">
<input name="Text2" id="2" type="text"><br>
<input type=button value="Open Window" onclick="open_win()" /></form>
</body>