Posted By

jerryvig on 11/09/11


Tagged


Versions (?)

Millenium NY Form Validator


 / Published in: JavaScript
 

https://re.clintonfoundation.org/SSLPage.aspx?pid=4293

  1. <script type="text/javascript">
  2. $(document).ready(function(){
  3. var onclickFn = $("#PC21864_Wizard1_StepNavigationTemplateContainerID_BBButton3").attr("onclick");
  4. $("#PC21864_Wizard1_StepNavigationTemplateContainerID_BBButton3").attr("onclick")
  5. document.getElementById("PC21864_Wizard1_StepNavigationTemplateContainerID_BBButton3").setAttribute("onclick","nextClick()");
  6. });
  7. function nextClick() {
  8. var selectsArray = new Array( $("#PC21864_Wizard1_dgEventItems2_ctl02_dgPriceList_ctl02_ddlQuantity"), $("#PC21864_Wizard1_dgEventItems2_ctl02_dgPriceList_ctl03_ddlQuantity"), $("#PC21864_Wizard1_dgEventItems2_ctl02_dgPriceList_ctl04_ddlQuantity"), $("#PC21864_Wizard1_dgEventItems2_ctl02_dgPriceList_ctl05_ddlQuantity"), $("#PC21864_Wizard1_dgEventItems2_ctl02_dgPriceList_ctl06_ddlQuantity") );
  9. var atLeastOneSet = "false";
  10. for ( var i=0; i<selectsArray.length; i++ ) {
  11. var selectedVal = selectsArray[i].val()+0;
  12. if ( selectedVal > 0 ) {
  13. atLeastOneSet = "true";
  14. break;
  15. }
  16. }
  17. if ( atLeastOneSet == "true" ) {
  18. alert( "Debug: At least one set");
  19. }
  20. else {
  21. alert( "Debug: not set" );
  22. }
  23. }
  24. </script>

Report this snippet  

You need to login to post a comment.