I use four asp.net text boxes to capture data. I need to allow data to entered if at least one textbox is populated. I want to do this in client side, using javascript. I can do this server side. I don’t wanna send a request to server for only this. I am not good at javascript.
Share
Validate your form onsubmit event.
Create a function that validate your fields and then return a boolean. If result is false the form will not be sand.
Example for validate funcition, this will return true only if your field text value has more then 10 chars.
Try to use jQuery, its simpler to do this task like:
In the HTML form tag:
You can customize the code to do other things, but this is the main idea.