Codice file.asp:
codice:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Nuova pagina 1</title>
<script type="text/javascript">
function restituisci(quale){
window.opener.document.forms[0].elements["C1"].style.display="none";
window.opener.document.forms[0].elements["C2"].style.display="";
window.opener.document.forms[0].elements["C2"].value = quale;
window.close();
}
</script>
</head>
<body>
<select size="1" name="D1" onchange="restituisci(this.value);">
<option value="aaa">aaa</option>
<option value="bbb">bbb</option>
<option value="ccc">ccc</option>
</select>
</p>
</body>
</html>
Codice index.htm:
codice:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Nuova pagina 1</title>
<script type="text/javascript">
function apriPopUp()
{
window.open('file.asp', '', 'width=380, height=240, left=200, resizable=yes, scrollbars=yes');
}
</script>
</head>
<body>
<form method="POST" action="">
<input type="checkbox" name="C1" value="ON" onclick="apriPopUp();">
<input type="text" name="C2" value="" style="display: none;">
<input type="submit" value="Invia" name="B1">
<input type="reset" value="Reimposta" name="B2">
</p>
</form>
</body>
</html>
Forse si dovranno aggiustare i name ai tuoi previsti.
IExplorer mi manda il consueto "Aprire o salvare il file?"
Assunto questo, possiamo poi condizionare l' esecuzione nella funzione, allo stato del checkbox; per evitare che apra un' altra pop-up togliendo la spunta.