Yes, the same people I  have seen do it also only allow the form to be
submitted via JS.  I have even seen where they only allow it to be submitted
from JS then they populate a hidden form value with a label, which again
seems flawed because then in the processing code they check for specific
labels.  Change the label and the processing code fails to run as expected.

On Tue, Mar 11, 2008 at 3:33 PM, Dominic Watson <
[EMAIL PROTECTED]> wrote:

> >
> > I have seen some people just do it off the value of the Submit button.
> > Although kind of sucks when they change the value in the button but
> forget
> > to change  their switch/case or if/else on the processing end of things.
>
>
> You can do that, but if your user hits return to submit the form, the
> submit
> button name will not be posted. While you can't hit return to submit all
> forms, I think it preferable to use one technique throughout your code.
>
> Here is a demo template, run it by hitting the submit button and then
> again by hitting return after entering some text (if it works, try it in
> another browswer, I think this is a broswer issue).
>
> <cfif StructKeyExists(form,"myButton")>
>  <h1>Hello world</h1>
> </cfif>
>
> <form action="" method="post">
>  <input name="foo" value="bar"/>
>  <input type="submit" value="Go go gadget legs" name="myButton" />
> </form>
>
> The code will do what you expect in Firefox but not in IE.
>
> Dom
>
> --
> Blog it up: http://fusion.dominicwatson.co.uk
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301028
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to