snippet library logo
in category
Javascript / Forms / display form contents in a popup
Snippet details
ID: 483
Viewed: 1332
Added: 2002-09-03
Version:
View Demo

User Rated at: 5 Stars
Rate This:
Snippets in this catagory         
Show Printable Version
takes form entries, and uses the document.write command to generate output into a popup window.

General Details
Snippet uploaded by: Dr. Web
Email : harbor31@hotmail.com
Snippet By: Dr. Web

<!---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>&nbsp;&nbsp;&nbsp;&nbsp;" + document.form1.yourname.value;
    message+="<li><b>address:  </b>" + document.form1.address.value;
    message+="<li><b>Phone:    </b>&nbsp;&nbsp;&nbsp;" + 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


Please completely fill out the form below if you want to review this snippet. All reviews are subject to validation.


Subject:

Reviewed By:

Write a review:





Terms of Conditions
Powered By
Avian Hosting
© 2005 snippetlibrary.com All Rights Reserved.