Jump to content

How to combine these two JQuery Function with else or else if statement, Lost li


Recommended Posts

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>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.