on 09-18-2008 9:32 AM
Dear,
I'm building some validations in my form, using javascript.
I staretd with using the Validate event however that is called every time someone does basically anything on the form. It's too global and to non-discriminating.
I have 6 particular fields where I do checks on the values entered there, but if I use the Validate event I can only work in a couple of them. I could use IFs and save all the values in hidden fields and then check on every validate which one of them changed, but this would be much too cumbersome.
Is there a function I can call to see where the focus is at the moment? Where the point of the keyboard is?
I started using the change event, but this checks too often and I had issues with retrieving values from the field.
Any ideas?
Thanks in advance,
Frederik-Jan Roose
Hi Frederik,
Instead of putting all validations into Validate method, you can put validations for each field on their corresponding exit events.
Like if you want to validate that field1 cannot be null then you can place the script on exit event of the field.
Hope this helps.
Cheers,
Arafat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.