code_junkie

Validate Radio Button Group Client Side

Nov 12th, 2011
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. <script type="text/javascript" language="javascript">
  2. function Validate()
  3. {
  4. var l_elemsRadios = document.getElementById("MyRadios").getElementsByTagName("input");
  5.  
  6. if (l_elemsRadios == null)
  7. return;
  8.  
  9. for (var i = 0; i < l_elemsRadios; i++)
  10. {
  11. // validate l_elemsRadios[i] through l_elemsRadios[n]
  12. }
  13. }
  14. </script>
  15.  
  16.  
  17. <div id="MyRadios">
  18. <input type="radio" name="EndorsementType" value="Remove Property from TIV" >Remove Property from TIV
  19. .
  20. .
  21. .
  22. </div>
Add Comment
Please, Sign In to add comment