Looks to me like you have the function checkForm() commented out <!--- with a
CF comment. I noticed you have a javascript commenter '//' before the closing
CF comment, but keep in mind the CF comments are processed on the server side,
and javascript comments are only there on the client side.
Lastly, your Return should not be capitalized, and neither should True. Here's
your script (try this):
<script language="JavaScript">
function checkForm() {
var ValidPassed = true;
while (ValidPassed) {
if (!document.fBuyout.varFname.value.length) {
alert("Enter First Name.");
document.fBuyout.varFname.focus();
ValidPassed=false;
break; // you don't need this line the loop will break
on its own
}
}
return ValidPassed;
}
</script>
Dave
-----Original Message-----
From: King, Chris [mailto:[EMAIL PROTECTED]
Sent: Friday, July 22, 2005 10:53 AM
To: CF-Newbie
Subject: form validation
Hello, all. I am trying to do some form validation, but it isn't
working. Instead of giving me the alert, it takes me to the action page,
no matter what I type in. I basically took this code straight from a
book. Any ideas? Thanks.
******************************************************************************************
The information contained in this message, including attachments, may contain
privileged or confidential information that is intended to be delivered only to
the
person identified above. If you are not the intended recipient, or the person
responsible for delivering this message to the intended recipient, ALLTEL
requests
that you immediately notify the sender and asks that you do not read the
message or its
attachments, and that you delete them without copying or sending them to anyone
else.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message: http://www.houseoffusion.com/lists.cfm/link=i:15:1320
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54