This is copied directly from a DevShed example, and created in a file called submit.php.
I'm using IE 5.5, and everytime it submits, it simply comes back to submit.php - never gives me a message. Any idea why? Erin Quick-Laughlin
DBA, PHP/MySQL programmer
Code:
<html>
<head>
<script>
function printMessage()
{
alert("No, the answer is not " + document.forms[0].answer.value
+ ".\nEveryone knows the answer is 42.");
return false;
}
</script>
</head>
<body>
<form action="submit.php" method="post" onSubmit="return
printMessage()"> What is the answer? <br> <input type="text"
name="answer"> <br> <input type="submit" value="Tell me the answer!">
</form>
</body>
</html>
I'm using IE 5.5, and everytime it submits, it simply comes back to submit.php - never gives me a message. Any idea why? Erin Quick-Laughlin
DBA, PHP/MySQL programmer