But Terri wants to compare the client-side form element values to what's in the
db. In order to do this, she'll have to get the db info into JS. She could
query for the data and then convert it to JS via CFWDDX ACTION=CFML2JS.
-David
On Monday, March 26, 2001 6:40 AM, Dylan Bromby [SMTP:[EMAIL PROTECTED]] wrote:
> yes you can do this. you can reference the form elements by object name. you
> don't have to submit the form to validate or check values. you can do it
> using onFocus and/or onBlur.
>
> -----Original Message-----
> From: Terri Stocke [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 26, 2001 6:34 AM
> To: CF-Talk
> Subject: Is this possible?
>
>
> Hey all,
>
> Is it possible to determine what a user has inputted in a form BEFORE the
> form is submitted? What I would like to do is IF a user makes a selection in
> the form that conflicts with information already in the db, I want to have a
> javascript popup alert them to the discrepancy and have them verify if they
> want to continue. Otherwise, just a regular submit button would be
> displayed.
>
> I have the javascript alert/confirm working alright, but I can't figure out
> how to get it to check the formfields and only display conditionally. I
> don't even think this is possible, considering that CF is server-side and
> essentially what I want to do is have CF determine what was selected BEFORE
> it is submitted. Is there a way I can determine this with JavaScript (I'm
> not very good at JS, so "baby steps", please ;).
>
> I know I could do this within CF and just have the form submit to an interim
> confirmation page, but I would rather do this on the client.
>
> Thanks!
> Terri
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists