View Full Version : validation javascript using type

Aug 29th, 2010, 03:17 PM
I have a form which contains multiple inputs with type 'text' and 'radio' buttons, and i'm trying to validate all these fields using javascript.

Know that the id's and names came from database.

so i want to validate by type.

Please anyone help me as fast as possible
thank you

Old Pedant
Aug 29th, 2010, 10:16 PM
Not enough details.

What's the definition of a *correct* text box contents vs. incorrect contents?

If by "validate radio buttons" you mean you just need to make sure that one of each group is checked, that's trivial. But there are so many ways to validate text boxes (e.g., they must contain names, or money amounts, or email addressses, or phone numbers or zip codes or or or) that we can't begin to guess what you want.