Re: improved js for form validation?

2007-03-08 Thread Massimo Foti
 Does anyone know if there are improved form validation scripts available
 for download (yes, I know I can make my own).  

This can be worth a look:
http://www.massimocorner.com/validator/



 Specifically, if I use
 validate=integer, it is approving a value of 1+. 

http://www.massimocorner.com/validator/reference/index.htm

  
Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com
  


~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/

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


RE: improved js for form validation?

2007-03-08 Thread Robert Rawlins - Think Blue
I still don't get why people use JS for form validation, Why not just place
some decent server side stuff on it? It's allot less hassle and allot more
secure.

Rob

-Original Message-
From: Massimo Foti [mailto:[EMAIL PROTECTED] 
Sent: 08 March 2007 09:28
To: CF-Talk
Subject: Re: improved js for form validation?

 Does anyone know if there are improved form validation scripts available
 for download (yes, I know I can make my own).  

This can be worth a look:
http://www.massimocorner.com/validator/



 Specifically, if I use
 validate=integer, it is approving a value of 1+. 

http://www.massimocorner.com/validator/reference/index.htm

  
Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com
  




~|
Create Web Applications With ColdFusion MX7  Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/

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


Re: improved js for form validation?

2007-03-08 Thread Massimo Foti
 I still don't get why people use JS for form validation,

Maybe because it allows for a better user's exerience ? :-)



 Why not just place some decent server side stuff on it?

I use both client and server-side validation. Many people consider it a best 
practice



 It's allot less hassle and allot more secure.

It's less hassle for the developer, much more hassle for the user


Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com





~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/

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


RE: improved js for form validation?

2007-03-08 Thread Robert Rawlins - Think Blue
I'm not so sure I agree that it does benefit the user experience, Perhaps
for some of the more complex validations, but generally when I click the
'submit' button and I get a horrible windows style 'BP!!!' and a notice
window that I've missed out my name I find it to be a little offensive more
than helpful.

With the server side validation you can have it pass the user back to the
form with subtle highlights and suggestions as to where they missed a few
things, far more pleasant, far more informative.

I've never really seen client side validation to be beneficial as it takes
all the additional time to code and test, and then you have to consider that
over 20% or browsers have JS disabled and wouldn't be able to take advantage
anyway, so you're probably going to kiss good bye to the accessibility of
your site.

The studies run about the drop in JavaScript support by users seemed to find
the core reason for disabling it was down to it being an annoyance rather
than any form of benefit.

Server side is accessible, quick and easy to maintain and develop, and is
totally secure as its not reliant on the client to support it, it serves all
purposes, I've always seen JavaScript validation to be solving a problem
that doesn't exist.

Rob

-Original Message-
From: Massimo Foti [mailto:[EMAIL PROTECTED] 
Sent: 08 March 2007 10:07
To: CF-Talk
Subject: Re: improved js for form validation?

 I still don't get why people use JS for form validation,

Maybe because it allows for a better user's exerience ? :-)



 Why not just place some decent server side stuff on it?

I use both client and server-side validation. Many people consider it a best

practice



 It's allot less hassle and allot more secure.

It's less hassle for the developer, much more hassle for the user


Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com







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

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


Re: improved js for form validation?

2007-03-08 Thread Massimo Foti
 I'm not so sure I agree that it does benefit the user experience, Perhaps
 for some of the more complex validations, but generally when I click the
 'submit' button and I get a horrible windows style 'BP!!!' and a 
 notice
 window that I've missed out my name I find it to be a little offensive 
 more
 than helpful.

There are better options that 'BP!!!' :-)
Something like this is, in my opinion, does benefit the user experience:
http://www.massimocorner.com/validator/samples/custom_error.htm

Of course, it's just a matter of opinions.



 With the server side validation you can have it pass the user back to the
 form with subtle highlights and suggestions as to where they missed a few
 things, far more pleasant, far more informative.

See above, you can do the same client-side, without reloading the page.



 I've never really seen client side validation to be beneficial as it takes
 all the additional time to code and test,

It's, again, a matter of opinions. I developed a dedicated library just for 
that. I write the code just once and it implements validation both on the 
client and server-side. The client-side library is available for download, 
the server-side is not (not yet at least)



 and then you have to consider that
 over 20% or browsers have JS disabled and wouldn't be able to take 
 advantage
 anyway, so you're probably going to kiss good bye to the accessibility of
 your site.

20%??? Come on, even the most anti-JS zealots will never agree on this 
number :-)))

BTW Any serious stat that consider the percentage of JS disabled should 
exclude search engine robots, I haven't seen one that does.



 so you're probably going to kiss good bye to the accessibility of
 your site.

Again, on public facing websites I use both.



 Server side is accessible, quick and easy to maintain and develop, and is
 totally secure as its not reliant on the client to support it, it serves 
 all
 purposes, I've always seen JavaScript validation to be solving a problem
 that doesn't exist.

We just disagree on this. It's fine for me.


Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com



~|
Create Web Applications With ColdFusion MX7  Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/

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


RE: improved js for form validation?

2007-03-08 Thread Leitch, Oblio
First, thanks to everyone for responding.  However, I never intended to
start a flame war - the fact is I'm using JS and it's not working right.
Specifically, I'm using CF's built in validation for ranges in a
cfinput tag.  The trouble I'm having is it's accepting a value of
1+.  Technically, it contains a valid integer; however, the addition
of the plus sign invalidates the value as an integer.  I was really
hoping to illicit commentary about the methods CF's JS routine uses to
reach its decision.  I don't want to use another JS validation system
(unless I can find no other way), and I don't want to specially code my
processing to deal with one special case.

 

Does anyone know why CF's code would consider this valid?  Has there
been any attempts to improve the /CFIDE/scripts/cfform.js routines?

 

TIA,

 

Oblio


This email message may contain privileged and/or confidential information. If 
you are not the intended recipient(s), you are hereby notified that any 
dissemination, distribution, or copying of this email message is strictly 
prohibited. If you have received this message in error, please immediately 
notify the sender and delete this email message from your computer.



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

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


Re: improved js for form validation?

2007-03-08 Thread Josh Nathanson
Oblio,

A lot of people on this list don't like cfforms for just the reason you are 
stating - there are flaws in the js such as the one you've discovered.

I did some testing and found that 1$ will also slip through, as well as 1, 
(one with a comma).

This is why people are saying to try another validation scheme.  All you can 
do is hope the js validations are better in CF8, and get cracking with 
Massimo's validation, qForms or whatever.

-- Josh




- Original Message - 
From: Leitch, Oblio [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Thursday, March 08, 2007 8:45 AM
Subject: RE: improved js for form validation?


 First, thanks to everyone for responding.  However, I never intended to
 start a flame war - the fact is I'm using JS and it's not working right.
 Specifically, I'm using CF's built in validation for ranges in a
 cfinput tag.  The trouble I'm having is it's accepting a value of
 1+.  Technically, it contains a valid integer; however, the addition
 of the plus sign invalidates the value as an integer.  I was really
 hoping to illicit commentary about the methods CF's JS routine uses to
 reach its decision.  I don't want to use another JS validation system
 (unless I can find no other way), and I don't want to specially code my
 processing to deal with one special case.



 Does anyone know why CF's code would consider this valid?  Has there
 been any attempts to improve the /CFIDE/scripts/cfform.js routines?



 TIA,



 Oblio


 This email message may contain privileged and/or confidential information. 
 If you are not the intended recipient(s), you are hereby notified that any 
 dissemination, distribution, or copying of this email message is strictly 
 prohibited. If you have received this message in error, please immediately 
 notify the sender and delete this email message from your computer.



 

~|
Create Web Applications With ColdFusion MX7  Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/

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


Re: improved js for form validation?

2007-03-08 Thread Dana Kowalski
I'm currently integrating Adobe's Spry form validation into most of my sites 
and its been wonderful so far. There's no need to have windows beeps as you 
call em when theres far more graceful notifications to the user that can be 
done.

Also, providing client side validation is great for you and your client for a 
couple reasons outside of best practices.

- if the customer is on a slow connection you've potentially saved them 2 page 
loads if you're action page redirects back etc vs a possibly cached script load 
up front that provides immediate feedback. I've seen customers who share a 
QoS'd T1 for their entire ... off-shore ... hundreds of employees operations 
... and you know what who do you think gets blamed for slow page loading 
from them? =\

- saves on bandwidth to some extent possibly (unless you gorge on js files 
-cough- prototype :D  ) not having to make multiple round trips for the same 
data subset.

~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade  see new features.
http://www.adobe.com/products/coldfusion

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


Re: improved js for form validation?

2007-03-08 Thread Josh Nathanson
Oblio, I got your intended result by doing the following:

cfinput
name=fld
required=yes
type=text
validate=regular_expression
pattern=^[\d]+$
message=not an integer.
/

I didn't bang on it too hard though, maybe you could test it further and see 
if it's failsafe.

It is lame though that you can't simply use the integer validation.

-- Josh




- Original Message - 
From: Leitch, Oblio [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Thursday, March 08, 2007 8:45 AM
Subject: RE: improved js for form validation?


 First, thanks to everyone for responding.  However, I never intended to
 start a flame war - the fact is I'm using JS and it's not working right.
 Specifically, I'm using CF's built in validation for ranges in a
 cfinput tag.  The trouble I'm having is it's accepting a value of
 1+.  Technically, it contains a valid integer; however, the addition
 of the plus sign invalidates the value as an integer.  I was really
 hoping to illicit commentary about the methods CF's JS routine uses to
 reach its decision.  I don't want to use another JS validation system
 (unless I can find no other way), and I don't want to specially code my
 processing to deal with one special case.



 Does anyone know why CF's code would consider this valid?  Has there
 been any attempts to improve the /CFIDE/scripts/cfform.js routines?



 TIA,



 Oblio


 This email message may contain privileged and/or confidential information. 
 If you are not the intended recipient(s), you are hereby notified that any 
 dissemination, distribution, or copying of this email message is strictly 
 prohibited. If you have received this message in error, please immediately 
 notify the sender and delete this email message from your computer.



 

~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade  see new features.
http://www.adobe.com/products/coldfusion

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


RE: improved js for form validation?

2007-03-08 Thread Leitch, Oblio
Thanks, that was nice and direct.  I actually tracked down the problem;
it lies in the fact that the cfform.js *changes* the value before
validating.  I can't guess why they did this, but they strip spaces,
dollar, pound, yen, euro, commas, tildas and plus signs before deciding
that it's good.  I'm not sure how you can call that validation.

At least now I have a reason/explanation and I can make an argument for
retro-fitting all the forms.

OT:  has anyone used Dojo?



-Original Message-
From: Josh Nathanson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 08, 2007 1:04 PM
To: CF-Talk
Subject: Re: improved js for form validation?

Oblio,

A lot of people on this list don't like cfforms for just the reason you
are 
stating - there are flaws in the js such as the one you've discovered.

I did some testing and found that 1$ will also slip through, as well as
1, 
(one with a comma).

This is why people are saying to try another validation scheme.  All you
can 
do is hope the js validations are better in CF8, and get cracking with 
Massimo's validation, qForms or whatever.

-- Josh

This email message may contain privileged and/or confidential information. If 
you are not the intended recipient(s), you are hereby notified that any 
dissemination, distribution, or copying of this email message is strictly 
prohibited. If you have received this message in error, please immediately 
notify the sender and delete this email message from your computer.


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

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


Re: improved js for form validation?

2007-03-08 Thread Josh Nathanson
 Thanks, that was nice and direct.  I actually tracked down the problem;
 it lies in the fact that the cfform.js *changes* the value before
 validating.  I can't guess why they did this, but they strip spaces,
 dollar, pound, yen, euro, commas, tildas and plus signs before deciding
 that it's good.  I'm not sure how you can call that validation.

If you type 1+ into the field, and submit to a database, does the 1+ get 
inserted into your database, or does 1 get inserted into the database?

If it's 1, then I can see the logic behind what CF is doing there.  It's 
helping you by stripping any extra garbage that might be associated with an 
integer (currency symbols etc.).  As long as what's left after the garbage 
is stripped off validates ok, it will pass through.  This relieves you of 
the need to do that stripping yourself.

But this seems somewhat arbitrary, and could lead to unexpected results, so 
it's probably best not to rely on it.

-- Josh


~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7  
Flex 2. 
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/

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


RE: improved js for form validation?

2007-03-08 Thread Leitch, Oblio
It does not - because CF passes along a copy of the value and not the
object.value, it does not alter what's actually in the form.  That's why
it's such a problem.

-Original Message-
From: Josh Nathanson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 08, 2007 3:29 PM
To: CF-Talk
Subject: Re: improved js for form validation?

If you type 1+ into the field, and submit to a database, does the 1+ get

inserted into your database, or does 1 get inserted into the database?

If it's 1, then I can see the logic behind what CF is doing there.  It's

helping you by stripping any extra garbage that might be associated with
an 
integer (currency symbols etc.).  As long as what's left after the
garbage 
is stripped off validates ok, it will pass through.  This relieves you
of 
the need to do that stripping yourself.

But this seems somewhat arbitrary, and could lead to unexpected results,
so 
it's probably best not to rely on it.

-- Josh

This email message may contain privileged and/or confidential information. If 
you are not the intended recipient(s), you are hereby notified that any 
dissemination, distribution, or copying of this email message is strictly 
prohibited. If you have received this message in error, please immediately 
notify the sender and delete this email message from your computer.


~|
Macromedia ColdFusion MX7
Upgrade to MX7  experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion

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


Re: improved js for form validation?

2007-03-08 Thread Josh Nathanson
 It does not - because CF passes along a copy of the value and not the
 object.value, it does not alter what's actually in the form.  That's why
 it's such a problem.

Well, that certainly blows.

In cfforms' defense, I've used it to validate email addresses, and just to 
validate that a field wasn't empty, and it's saved me some time in those 
instances.  I've never used it to validate an integer.

I would second Massimo's validation scripts - I don't know about Dojo.

Also people like qForms, although I think Massimo's stuff is more 
lightweight.

-- Josh 


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

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


Re: improved js for form validation?

2007-03-08 Thread Claude_Schn�egans
 Why not just place some decent server side stuff on it?

Probably because detecting errors before the form is submitted makes 
form much more user friendly.

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

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


improved js for form validation?

2007-03-07 Thread Leitch, Oblio
Does anyone know if there are improved form validation scripts available
for download (yes, I know I can make my own).  Specifically, if I use
validate=integer, it is approving a value of 1+. 

 

Thanks


This email message may contain privileged and/or confidential information. If 
you are not the intended recipient(s), you are hereby notified that any 
dissemination, distribution, or copying of this email message is strictly 
prohibited. If you have received this message in error, please immediately 
notify the sender and delete this email message from your computer.



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

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


Re: improved js for form validation?

2007-03-07 Thread Scott Weikert
Leitch, Oblio wrote:
 Does anyone know if there are improved form validation scripts available
 for download (yes, I know I can make my own).  Specifically, if I use
 validate=integer, it is approving a value of 1+. 
   
Take a look at qForms -

http://www.pengoworks.com/index.cfm?action=get:qforms


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

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


RE: improved js for form validation?

2007-03-07 Thread Andy Matthews
I'm a fan of Massimo's tmt_validator. It's the best, simplest one I've found
thus far. 

-Original Message-
From: Leitch, Oblio [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 07, 2007 3:33 PM
To: CF-Talk
Subject: improved js for form validation?

Does anyone know if there are improved form validation scripts available for
download (yes, I know I can make my own).  Specifically, if I use
validate=integer, it is approving a value of 1+. 

 

Thanks


This email message may contain privileged and/or confidential information.
If you are not the intended recipient(s), you are hereby notified that any
dissemination, distribution, or copying of this email message is strictly
prohibited. If you have received this message in error, please immediately
notify the sender and delete this email message from your computer.





~|
Create Web Applications With ColdFusion MX7  Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/

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