function checkOranges(numOranges)
{
if (numOranges == hi)
{
alert("hai");
}
}
</script>
</head>
<body>
<h3> How many Oranges did you eat? </h3>
<form method="POST" name="orangesform"
onSubmit="checkOranges(document.orangesform.numOranges.value);">
<input type="text" name="numOranges" id=numOranges />
<input type="Submit" name="Submit" />
</form>
</body>
</html>
I'm using numOranges becuase I am borrowing from the lifehacker tutorial to try and get an idea of what im doing. Basically what I want to happen is when you type hi into the submission box and hit submit, the alert "hai" will come up, but I can't seem to accomplish this. Help please?
You are referencing hi as a variable, not the "hi" string it should be.
if(numOranges == "hi")
__________________ ^_^
If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
* The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".