Javascript / Forms / display form contents in a popup
takes form entries, and uses the document.write command to generate output into a popup window.
<!---Head--->
<!--Form, takes entries in a table, and outputs to user ul through a new window-->
<!--Tuesday, write the output to the new window, in a ul.-->
<table cellspacing="5" cellpadding="5" bordor="1">
<script language="javascript1.3">
// the function called "display" opens a new window, 300px wide, 200px high//
// no tools or status. Display the entries from "form1"//
function display() {
DispWin=window.open('','NewWin',
'toolbar=no, status=no, width=300, height=200')
message="<ul><li><b>name: </b> " + document.form1.yourname.value;
message+="<li><b>address: </b>" + document.form1.address.value;
message+="<li><b>Phone: </b> " + document.form1.phone.value + "</ul>";
DispWin.document.write(message);
}
</script>
</table>
<!---Body--->
<body bgstyle="color:black" text="white" title="Form Output page" leftmargin=5 topmargin=5>
<h1>Form Display</h1>
Enter the following information. When you press the display button,<br >
you will receive the entries in a new window. <br >
<table cellspacing="5" cellpadding="5" border="0">
<form name="form1">
<tr>
<td><b>Name ?</b></td>
<td><input length="15" name="yourname" ></td>
<tr>
<td><b>Address ?</b></td>
<td><input length="15" name="address"></td>
<tr>
<td><b>Phone ?</b></td>
<td><input length="20" name="phone"></td>
<tr><td></td><td><Div align="right"><input type="submit" value="Display" onclick="display();"></td>
</form>
</table>
No Reviews to show
