| First of all, don't use CFFORM. In fact, NEVER use CFFORM. Roll your own
| JavaScripts for validation instead.
Why not? For _simple_ validation, it's quick, it's easy, and it does the
job. Besides, when you combine it with CF validation and then database
validation on top of that, it's not quite as critical that the JS gets it
100% all the time. Besides, what if some wiseguy makes a copy of your form,
alters the JS and then submits it to your site. At that point, it's the CF
and database validation that really matter. Now, I know there are ways to
prevent something like that from happening, but my point is, to me, JS is
just a nice thing I do for the users to save them some time. I don't rely
on it for any type of serious data validation/formatting. So, for me, the
default stuff in <cfform> works just fine, unless I need the data stored in
some format other than the CF_javascript will accept.
Is there something I am not thinking about that I should be?
Todd
----- Original Message -----
From: "Mark Warrick" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, June 26, 2001 3:55 PM
Subject: RE: Drop-down menu and redirect based on selection
| First of all, don't use CFFORM. In fact, NEVER use CFFORM. Roll your own
| JavaScripts for validation instead.
|
| Second, use the following code for your nav form:
|
| <form action="redirect.cfm" method="post" onChange>
| <select name="theurl" onChange="document.forms[0].submit()">
| <option value="http://www.fusioneers.com">Fusioneers.com
| <option value="http://www.warrick.net">Mark's Personal Site
| <option value="http://www.houseoffusion.com">House of Fusion
| </select>
| <input type="submit" value="Go!">
| </form>
|
| And last, make sure you've got backup code just in case the user doesn't
| have JavaScript turned on:
|
| ---redirect.cfm---
| <cflocation url="#form.theurl#" addtoken="no">
|
| ---mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists