my requirement is User will check any checkbox and and click corresponding showDetails button then it will fetch me pop window ,in that either user will enter data in it or simply click close button(that means user didnt enter any data in child window) then user comes to parent window clicks save button in the main window then it should fire alert message saying that u have not entered data in that particular pop window and the corresponding checked checkbox row should be unchecked.
<script>
function popPage()
{
var Win = open("ex.html",'Doc');
}
</script>
</head>
<body bgcolor="#FFFFFF">
<form method="post" >
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr class='formheader' align='center'>
<td> </td>
<td>FromFlightOrigin</td>
<td>FromFlightDestination<
/td>
</tr>
<tr class='formdata'>
<td align='center'>
<input type="checkbox" name="optionCheck" id="optionCheck0" value="0" >
</td>
<td align=center>NYC
<input type='hidden' name='flightorigin0' value='NYC'></td>
<td align=center>LON
<input type='hidden' name='flightdestination0' value='LON'></td>
<td>
<input type="button" class='input' name="showDetailsBtn" value='showDetails' size="3" onclick="popPage()" >
</td >
</tr>
<tr class='formdata'>
<td align='center'>
<input type="checkbox" name="optionCheck" id="optionCheck1" value="1" >
</td>
<td align=center>NYC
<input type='hidden' name='flightorigin1' value='NYC'></td>
<td align=center>LON
<input type='hidden' name='flightdestination1' value='LON'></td>
<td>
<input type="button" class='input' name="showDetailsBtn" value='showDetails' size="3" onclick="popPage()" >
</td >
</tr>
<tr class='formdata'>
<td align='center'>
<input type="checkbox" name="optionCheck" id="optionCheck2" value="2" >
</td>
<td align=center>NYC
<input type='hidden' name='flightorigin2' value='NYC'></td>
<td align=center>LON
<input type='hidden' name='flightdestination2' value='LON'></td>
<td>
<input type="button" class='input' name="showDetailsBtn" value='showDetails' size="3" onclick="popPage()" >
</td >
</tr>
<tr class='formdata'>
<td align='center'>
<input type="checkbox" name="optionCheck" id="optionCheck3" value="3" >
</td>
<td align=center>NYC
<input type='hidden' name='flightorigin3' value='NYC'></td>
<td align=center>LON
<input type='hidden' name='flightdestination3' value='LON'></td>
<td>
<input type="button" class='input' name="showDetailsBtn" value='showDetails' size="3" onclick="popPage()" >
</td >
</tr>
</table>
</td>
</tr>
</table>
</td></tr></table>
<input type='submit' name='save' class='save' value='save' >
</form>
</body>
</html>
ex.html
----------
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr class='formdata'>
<input type='text' name='origin0' value=''></td>
</tr>
</table>
<input type='button' name='save' value='save'>
<input type='button' name='close' value='close'>
</BODY>
</HTML>