or <cfif structKeyExists(form, 'fieldnames')>

On 5/24/07, Rob O'Brien <[EMAIL PROTECTED]> wrote:
> I bet you're using the Enter key rather than clicking on the submit button.
> If you do that, the submit field will not be passed as a form field.
>
> Your best bet is to either test directly on "password" or insert a hidden
> input and test on that field.
>
> HTH,
> Rob
>
> -----Original Message-----
> From: Bobby Tomato [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 24, 2007 1:11 PM
> To: CF-Talk
> Subject: password form not working -- strange
>
> Strange problem... I'm trying to create a simple password form. Once the
> user presses the submit button, the ColdFusion code has a conditional to see
> if the field contained the password or not, and then execute some code.
>
> Here's what's happening: if I type in the password, the conditional doesn't
> execute, but if I copy/paste the password, it works fine. Just to make sure,
> I made the password something really simple so it's not a typo error
> ("open").
>
> I've tried this on two different ColdFusion servers, and I get the same
> result. I've tried it using both IE7 and Firefox 2.
>
> Here's the code that I have, I've simplified it down (the file is called
> test.cfm):
>
> <cfcode>
>
> <cfparam name="msg" default="">
>
> <cfif IsDefined("Form.Submit")>
>         <cfif Form.password EQ "open">
>                 <cfset msg = "Success!">
>         </cfif>
> </cfif>
>
> <form method="post" action="test.cfm">
>         <input name="password" type="password" size="17" id="password" /><br
> />
>         <input name="Submit" type="submit" id="Submit" value="Submit" />
> </form>
>
> <p>The password is &quot;open&quot; </p>
> <p><cfoutput><b>#msg#</b></cfoutput></p>
>
> </cfcode>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

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

Reply via email to