codice:
function popup() {
var np=window.open('','newpage','top=100, left=100, width=500, height=300');
np.document.open("text/html");
np.document.writeln('<html>');
np.document.writeln('<head>');
np.document.writeln('<title>printf("#\\t"+("iNAG");</title>');
np.document.writeln('</head>');
np.document.writeln('<body>')
np.document.writeln('<form action="step5.asp" method="post" name="form_dati">');
np.document.writeln('<table border="0" width="100%" height="69"> ');
np.document.writeln('<tr>');
np.document.writeln('<td width="5%" height="16">');
np.document.writeln('<input type="text" name="anno" size="4"></td>');
np.document.writeln('<td width="6%" height="16">');
np.document.writeln('<input type="text" name="scuola" size="15"></td>');
np.document.writeln('<input type="text" name="scuola" size="15"></td>');
np.document.writeln('<td width="9%" height="16">');
np.document.writeln('<input type="text" name="corso_freq" size="15"></td>');
np.document.writeln('<td width="11%" height="16">');
np.document.writeln('<input type="text" name="durata" size="4"></td>');
np.document.writeln('<td width="8%" height="16">');
np.document.writeln('<input type="text" name="barche" size="10"></td>');
np.document.writeln('<td width="9%" height="16" align="center">');
np.document.writeln('<input type="text" name="risultato" size="4"></td>');
np.document.writeln('</tr>');
np.document.writeln('</table>');
np.document.writeln('<input type="submit" value="Conferma">');
np.document.writeln('</form>');
np.document.writeln('</body>');
np.document.writeln('</html>');
np.focus();
}
Questa funzione quando richiamata apre una pop-up con all'interno il tuo form..
Ti basta inserire tutti i "np.document.writeln('');" che ti servono..
Per copiare il sorgente della pagina dovrebbe essere qualcosa del tipo ".outerHTML"..