Here is how I do it:
http://www.fordwebs.com/cfform.cfm
--
Ken Ford
Adobe Community Expert
Fordwebs, LLC
http://www.fordwebs.com
"nick.endgame" <webforumsuser@macromedia.com> wrote in
message
news:egm874$fqc$1@forums.macromedia.com...
> Hi,
>
> I am working on a script made by somebody else who has
since left the
> company.
> The page i am working on basically allows a user to
enter details such as
> first
> and last name, username, password and email.
>
> This page is called adduser.cfm and obviously uses a
form (html form not
> cf)
> and when the form is submitted the action property calls
itself
> (adduser.cfm).
>
> When the page is reloaded, condition statements are used
to verify data
> input
> from the form i.e.:
>
> <cfif Not IsLoaded("form.submit")>
> "display form like normal"
> <cfelse>
> "check form fields and output apropriate message"
> </cfif>
>
> Now, the problem i face is that if any of the form
fields are not
> completed or
> not valid then i want to display an error message
ideally without the form
> even
> being submitted, because using the structure of the code
written above
> only
> allows the form to be displayed if the submit button
hasn't been clicked.
> I
> want to check the details before the form is submitted.
>
> I know you can use cfform validation but i need to
perform validation such
> as
> checking the email domain against an email already
stored in a database
> and
> then displaying a message ideally next to the form field
with the error.
>
> Also, If you are going to say use javascript, I have and
it works
> perfectly,
> however, the IT director said "What if they have
javascript disabled?".
> And
> this is the reason why i have a headache!!!!
>
> I hope i have explained my problem clearly. Also, I am
afraid i cannot
> show
> any of the code.
>
> Thanks and i appreciate any response.
>