firehorse24
Programmer
Hi everyone,
Hope someone can help with it.
I had a web page in asp. it has a button has event handler. if I click the button, it run a js to open a new window, with 2 input (text) fields and a submit button in there. My question is how do I validate those 2 input fields in popup window and return value back to parent page?
Thanks a lot!
Here is my script:
Hope someone can help with it.
I had a web page in asp. it has a button has event handler. if I click the button, it run a js to open a new window, with 2 input (text) fields and a submit button in there. My question is how do I validate those 2 input fields in popup window and return value back to parent page?
Thanks a lot!
Here is my script:
Code:
<html>
<head>
<title>Untitled</title>
<script language="javascript">
<!--
function makenewwindow()
{
var newWindow = window.open("", "nwindw","width=200, height=300")
if (newWindow != null)
{
var newcontent = "<html><head><title>Sub Window </title></head>"
newcontent += "<body><form name='nwf1' ><input type='button' value='Submit Job' onclick= 'sbmnw(); return false;'><br>"
newcontent += "<input type='text' name='nwdate1' value='' size='8' maxlength='8' ><br>"
newcontent += "<input type='text' name='nwdate2' value='' size='8' maxlength='8' >"
newcontent += "</form></body></html>"
newWindow.document.write(newcontent)
newWindow.document.close
}
}
function sbmnw()
{}
// -->
</script>
</head>
<body>
<form>
<input type="button" Name="newone" value="Create New Window" onclick = "makenewwindow()">
</form>
</body>
</html>