mravimtnl
MIS
- Nov 1, 2009
- 47
I am getting an error of object required in the following code. Pls help me.
<head>
<meta http-equiv="Content-Language" content="en-us">
<script type="text/javascript">
function open_win()
{
try{
var x=parent.document.getElementById('1.Text1').nodeName;
var y=parent.document.getElementById('1.Text2').nodeName;
var mywin=window.open("");
mywin.document.write(x);
mywin.document.write;
}
catch(err)
{
txt="There was an error on this page.\n\n";
txt+="Error description: " + err.description + "\n\n";
txt+="Click OK to continue.\n\n";
alert(txt);
}
}
</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()
{
try{
var x=parent.document.getElementById('1.Text1').nodeName;
var y=parent.document.getElementById('1.Text2').nodeName;
var mywin=window.open("");
mywin.document.write(x);
mywin.document.write;
}
catch(err)
{
txt="There was an error on this page.\n\n";
txt+="Error description: " + err.description + "\n\n";
txt+="Click OK to continue.\n\n";
alert(txt);
}
}
</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>