javascript not being interpreted correctly
<p>At one point my code compiles correctly - all the lines etc - but the same code at a different place (by place i mean function) does not compile completely.</p>

<p>Here is the code:</p>

<pre><code>function updateEmployeeFunction() {

    updateFields.username = $("#usernameTxtInfo").val();
    updateFields.password = $("#passTxtInfo").val();
    updateFields.confPasswrord = $("#confPassTxtInfo").val();
    updateFields.firstName = $("#firstNameTxtInfo").val();
    updateFields.lastName = $("#lastNameTxtInfo").val();
    updateFields.email = $("#emailTxtInfo").val();
    updateFields.phone = $("#phoneTxtInfo").val();

    validateUsernameUpdate(updateFields.username);
    validateEmailUpdate(updateFields.email);
    validateFirstNameUpdate(updateFields.firstName);
    ValidatePhoneUpdate(updateFields.phone);
    validatePasswordUpdate(updateFields.password);
    validateConfirmPasswordUpdate(updateFields.password, updateFields.confPasswrord);

    if (updateFields.usernameCheckSuccess == true &amp;&amp; updateFields.emailCheckSuccess == true &amp;&amp;
            updateFields.firstNameCheckSuccess == true &amp;&amp; updateFields.phoneCheckSuccess == true &amp;&amp;
            updateFields.passwordCheckSuccess == true &amp;&amp; updateFields.confPassCheckSuccess == true) {

        callUpdateUser();
    }
}
</code></pre>

<p>and heres the code for the update user</p>

<pre><code>function callUpdateUser() {
    $(".ajaxLoader").show();

    var URL = getUpdateUserUrl();
    $.ajax({
        type: "POST",
        url: URL,
        cache: false,
        processData: true,
        success: updateUserCallSuccess,
        error: ajaxError
    });
}
</code></pre>

<p>The function <code>updateEmployeeFunction</code> is called when the update button is clicked,
and the validate functions, all of them, update the <code>updateFields.checks</code> respectively.</p>

<p>What my code is doing is that it is validating well and good but it does not go to the if part, where the real update is, but when i put debugger on it, it runs correctly.</p>

<p>Am I doing something wrong here and I have to click the update button twice to get it working?</p>

<p>And btw I am making a page in asp.net</p>
