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>
<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>