...

View Full Version : Simply to redirect form content on Another Page



natils
11-08-2004, 12:02 PM
The below script doesnt let me display the contents of the form to another page can someone suggest a wa y to redirect the contents as suggested to open in another page after the submit button is pressed .... help much appreciated

<html>

<head>
<title>[No Title]</title>
<script language="JavaScript">
<!--

function checkRequired(theForm)
{
var bMissing = false;
if ( 0 == theForm.textField.value.length )
bMissing = true;

if ( 0 == theForm.dropMenu.selectedIndex )
bMissing = true;

if ( bMissing )
{
alert( "All form fields are required.\n"
+ "Please complete them and Submit again.");

return false;
}
else
{
return true;
}
}

//-->
</script>
</head>

<body>

<form>

<p>Name : <input type="text" name="textField" size="20"><br>
Address : <input type="text" name="textField" size="20"><br>
Phone : <input type="text" name="textField" size="20"><br>

<select size="1" name="dropMenu">
<option selected value>Select One</option>
<option value="1">Male</option>
<option value="2">Female</option>
</select><br>

<input type="submit" value="Submit" name="submit"> &nbsp;
<input type="reset" value="Reset" name="reset"></p>
</form>

</body>

</html>

Roy Sinclair
11-08-2004, 06:16 PM
Your <form> tag needs an "action" property specifying the name of the page you want to load next.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum