An interesting side note to our recent JS discussion...

I went over to the Adobe/Macromedia store to look over the
products and noticed they were using JS, etc., to change their
page content without refreshing.

I decided to turn off active scripting to see what happened... and
I got a message stating that I couldn't see parts of the site and
that JS was required to view the site!

Seems like Macromedia has adopted the "Turn on Javascript or
you can't use our site" perspective and left those who refuse
or can't use it out in the cold.

I may do the same thing... how do they detect whether or not
JS is available on a browser and trigger the message that a visitor
must have JS running?

Rick



-----Original Message-----
From: Dan G. Switzer, II [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 18, 2007 6:16 AM
To: CF-Talk
Subject: RE: Client-side validation or Server-side Validation?

Rick,

>I see that page and the code's role in displaying the message.
>
>But the part that I'm trying to figure is how ex2_process.cfm
>is working to provide the validation and return that message
>to ex2.3_mailing_list_validation.cfm.
>
>ex2_process.cfm is the page doing your server-side validation,
>right?
>
>ex2.3_mailing_list_validation.cfm is just your client-side validation,
>form, and error/success message display page, correct?

Well this form is extremely simple--it was done for a presentation. So I'm
going to explain the functionality as if it was a larger form.

Basically the ex2_process.cfm validates all the data on via server-side
validation rules. If there are any errors, I build a complex variable (a
struct or an array) to hold the errors in. 

If there are errors in the form, instead of processing the form--the main
form page is displayed again--which handles displaying of the error
messages--and ex2_process.cfm stops processing code.

As an added wrinkle, trying signing up for mailing list w/the e-mail address
I'm posting from. This is mean to emulate something you can only validate on
the server. You'll also notice that no JS error is thrown, that the error is
generated by the server--because the page is reloaded.

Once you full grasp whats going on, I'll show you code that allows you to
improve on that.

-Dan




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275683
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