Hi,
This function will open a new window when you press the submit or any other button
Code:
function o(text) {
var w = window.open("","");
w.document.write("<html><body><h1>"+text+"</h1></body></html>");
}
where text is the output of the form.
To call this function when submit button is clicked write
Code:
<script language=javascript>
function myfunction() {
...
o(output_of_the_form);
}
</script>
<form onsubmit="myfunction()" ...
or from any other button write
Code:
<script language=javascript>
function myfunction() {
...
o(output_of_the_form);
}
</script>
<form ..>
<input type=button onclick="myfunction()" ...
Paul
Bookmarks