Hey, I sometimes use this bit of code to handle validation.
<cfif Len(FORM.cardexpmonth) EQ 0 OR Len(FORM.cardexpyear) EQ 0>
<script>
alert ("Please select a credit card expiration month/year");
history.back();
</script>
<p>You must select a valid expiration date before submitting form</p>
<p><cfoutput><a href="#CGI.http_referer#"><Go back</a></cfoutput></p>
<cfabort>
</cfif>
FORM.cardexpmonth and year are dropdown menus. If they didnt make a selection,
this script kicks in. If JS is turned off, the Text with link kicks in.
ANybody got a better way to handle this? OR is this good enough. Or is this way
incredibly tacky?
Will
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259282
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4