Re: Re: HTML_QuickForm DHTML client rules and SoftRequired rule

From: Date: Mon, 27 Mar 2006 19:10:17 +0000
Subject: Re: Re: HTML_QuickForm DHTML client rules and SoftRequired rule
References: 1 2 3 4 5 6 7 8  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-41997@lists.php.net to get a copy of this message
Justin Patrin wrote:
But you did. You gave the element focus (tabbing to it or clicking on it), then took the focus away (tabbing out of it or clicking elsewhere).
No. Just try yourself: Put the cursor into the second form field. Then hit the tabular key and see what happens. I've tested it with IE 6 and Firefox 1.5 and got immediately the question. This is not what I (and maybe also you) expect.
This constitues interacting with the element. Since you've interacted with the element but not done anything, it lets you know that there is a potential problem.
In the way you describe it, the behavior is okay and the question makes sense.
Again, this is more of a question of opinion. When would you like the error checking to happen? If not onBlur or onKeyUp, the only possibility left is onSubmit (unless you want to do it onMouseOver or onMouseOut, which I doubt). If you leave validation to onSubmit then you can have the other problems I've outlined. IMHO it's better to at least have the onBlur as it lets the user know, right after they've filled out the form, that they need to fix something.
Your point is valid, although I like these "early" messages not that much. I will play with your code in the next days and look for a solution that makes me really happy. ;-) Regards, Mark

« previous php.pear.dev (#41997) next »