danjapro Posted September 9, 2012 Share Posted September 9, 2012 I am trying to write these two function into simple else statement, where once validation is good and complete, page loading jquery begins. Please guide, I tried a few things, none seem to work as need. <script type="text/javascript"> /* <![CDATA[ */ jQuery(function(){ jQuery("#oldpassword").validate({ expression: "if (VAL.length > 5 && VAL) return true; else return false;", message: "Please enter a Current Password" }); jQuery("#password").validate({ expression: "if (VAL.length > 5 && VAL) return true; else return false;", message: "Please enter a valid New Password" }); jQuery("#confirmpassword").validate({ expression: "if ((VAL == jQuery('#password').val()) && VAL) return true; else return false;", message: "Confirm password doesn't match the new password" }); }); /* ]]> */ </script> <script type="text/javascript"> /* <![CDATA[ */ $(document).ready(function () { $("#loading-div-background").css({ opacity: 0.8 }); }); function ShowProgressAnimation() { $("#loading-div-background").show(); $(".button-2").hide(); } /* ]]> */ </script> Link to comment https://forums.phpfreaks.com/topic/268188-how-to-combine-these-two-jquery-function-with-else-or-else-if-statement-lost-li/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.