| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#16
|
|||
|
|||
|
Thanks a bunch Shadow Wizard
Thank you Shadow Wizard! I will look forward to seeing the new version. Not only the script is truly generic, it is also easy and straightforward to use it.
Thank you for posting it and sharing it. |
|
#17
|
||||
|
||||
|
OK, changes are done.
I added support in yet another attribute called "error_container" that define where you want error message to appear, then in the form HTML you need to add span with that ID - see the code in TestValidate.html to see what I mean. (you'll have to copy/download the new version) also note that all attributes are needed only in the first radio button or checkbox, not in all of them. good luck, let me know how it goes. |
|
#18
|
|||
|
|||
|
Thanks
Thank you very much Shadow Wizard. The fix works like a charm.
|
|
#19
|
|||
|
|||
|
Thank you, this saved me a lot of time. But I'd like to ask, what if someone remotely submitted the form to do an attack?... Then I'd still need to do ASP server-side validation?
__________________
[Video] 7 Devastating Effects of Oil Depletion Why Beautiful Young Women Can't Marry Rich and Powerful Men Your Birthday Cake Sucks! For more interesting reads, visit IcyBlog. |
|
#20
|
||||
|
||||
|
Quote:
You should never rely on js to do validation because users can very easily disable javascript and there goes your application. Javascript is only meant to enhance the user experience and save you a trip to the server but it's always best to do both ![]()
__________________
................... ASCII and ye shall receive .................. Knowledge is the only resource on earth that multiplies when shared Support the Shemzilla Project Powered by C# |
|
#21
|
|||
|
|||
|
Hmmm for me the page validates all right, but the error message doesnt show up beside the form that has an error. The cursor is blinking inside the form but the error message doesnt show up. I have given a value to msg="Error". What may I be doing wrong?
Problem Fixed. There must be a space after the input tag before you put other tags. Last edited by icywave : January 12th, 2008 at 07:15 PM. |
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > Javascript - Generic form validation |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|