Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preview window

Status
Not open for further replies.

mickywall

Programmer
Sep 2, 2002
88
GB
I have created a form, that also has a preview button. When the user clicks the preview button I would like to display what has been entered into the textbox (txtName) in a pop up preview window?


<html>
<head>
<title>Untitled Document</title>
<script language="JavaScript">
function OpenPreview()
{
if (document.form1.Preview) {

popupWin = window.open('preview.asp', 'preview', 'scrollbars=yes,width=750,height=450')
return true
}
}
</script>

</head>

<body>
<form method="post" action="preview.asp" name="form1">
<input name="txtName" type="text">
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Reset" value="Reset">
<input name="Preview" type="button" value="Preview" onclick="OpenPreview()"></div>
</form>
</body>
</html>
 
if (document.form1.Preview) {

popupWin = window.open('preview.asp', 'preview', 'scrollbars=yes,width=750,height=450')
popupWin.document.write("ASDASDASDASD")
return true
}



thats just an example for writing content to the popup page, u can also write html tags...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top