javascript - How to check if the checkboxlist, radiobuttonlist,dropdownlist is checked else dispaly a warning message -


i have multiple checkboxlists,radiobuttonlists,dropdownlists in asp.net page. fields required cannot left blank. number of items big total 73. looking option check validation through java-script if controls empty display warning message below each control int current section. have next buttons @ end of each section validate current elements in current section. idea implementation of java-script code can reused each of list. jquery work

just iterate through checkbox/radiobutton elements , check .checked property. if show true, display warning.

as dropdown list, check .selectedindex property on 'select' element. if it's 0, user didn't select anything. requires first item in list not acceptable value (e.g., websites make first option 'choose option').


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -