jquery not working as expected in windows server 2003 R2
<p>I am using jquery in my asp.net website. It was working fine in my local system. But when I published it in the server it is not working. My jquery code is as follow,</p>

<pre><code>    $("#&lt;%=btnSubmit.ClientID %&gt;").click(function (ev) {
    ev.preventDefault();
    $(this).attr("disabled", true);
    if ($("#&lt;%=ddlLetterType.ClientID %&gt;").val() == "-1") {
        alert("Please select a letter.");
        $("#&lt;%=ddlLetterType.ClientID %&gt;").focus();
        $("#&lt;%=btnSubmit.ClientID %&gt;").attr("disabled", false);
        return false;
    } else if ($("#&lt;%=ddlLetterType.ClientID %&gt;").val() == "1") {
        if ($("#&lt;%=ddlEmbassyCountry.ClientID %&gt;").val() == "-1") {
            alert("Please select an Embassy Country.");
            $("#&lt;%=ddlEmbassyCountry.ClientID %&gt;").focus();
            $("#&lt;%=btnSubmit.ClientID %&gt;").attr("disabled", false);
            return false;
        } else if ($("#&lt;%=ddlTravelCountry.ClientID %&gt;").val() == "-1") {
            alert("Please select a Travel Country.");
            $("#&lt;%=ddlTravelCountry.ClientID %&gt;").focus();
            $("#&lt;%=btnSubmit.ClientID %&gt;").attr("disabled", false);
            return false;
        } else if ($("#&lt;%=txtEmbassyAddress.ClientID %&gt;").val() == "") {
            alert("Please enter embassy address.");
            $("#&lt;%=txtEmbassyAddress.ClientID %&gt;").focus();
            $("#&lt;%=btnSubmit.ClientID %&gt;").attr("disabled", false);
            return false;
        } else if ($("#&lt;%=txtPassportNo.ClientID %&gt;").val() == "") {
            alert("Please enter passport no.");
            $("#&lt;%=txtPassportNo.ClientID %&gt;").focus();
            $("#&lt;%=btnSubmit.ClientID %&gt;").attr("disabled", false);
            return false;
        } else if ($("#&lt;%=txtPlaceOfMeeting.ClientID %&gt;").val() == "") {
            alert("Please enter place of meeting.");
            $("#&lt;%=txtPlaceOfMeeting.ClientID %&gt;").focus();
            $("#&lt;%=btnSubmit.ClientID %&gt;").attr("disabled", false);
            return false;
        } else if ($("#&lt;%=txtStartDate.ClientID %&gt;").val() == "") {
            alert("Please enter start date.");
            $("#&lt;%=txtStartDate.ClientID %&gt;").focus();
            $("#&lt;%=btnSubmit.ClientID %&gt;").attr("disabled", false);
            return false;
        } else if ($("#&lt;%=txtEndDate.ClientID %&gt;").val() == "") {
            alert("Please enter end date.");
            $("#&lt;%=txtEndDate.ClientID %&gt;").focus();
            $("#&lt;%=btnSubmit.ClientID %&gt;").attr("disabled", false);
            return false;
        } else {
            var parameter = {
                request_no: $("#&lt;%=lblRequestNo.ClientID %&gt;").text(),
                initiator_user_id: $("#&lt;%=hInitiatorUserId.ClientID %&gt;").val(),
                initiatingDate: $("#&lt;%=lblRequestdate.ClientID %&gt;").text(),
                embassy_country_id: $("#&lt;%=ddlEmbassyCountry.ClientID %&gt;").val(),
                embassy_address: $("#&lt;%=txtEmbassyAddress.ClientID %&gt;").val(),
                nationality: $("#&lt;%=lblNationality.ClientID %&gt;").text(),
                passport_no: $("#&lt;%=txtPassportNo.ClientID %&gt;").val(),
                company: $("#&lt;%=lblCompanyName.ClientID %&gt;").text(),
                designation: $("#&lt;%=lblDesignation.ClientID %&gt;").text(),
                joining_date: $("#&lt;%=lblJoiningDate.ClientID %&gt;").text(),
                travel_country_id: $("#&lt;%=ddlTravelCountry.ClientID %&gt;").val(),
                place_of_meeting: $("#&lt;%=txtPlaceOfMeeting.ClientID %&gt;").val(),
                travel_start_date: $("#&lt;%=txtStartDate.ClientID %&gt;").val(),
                travel_end_date: $("#&lt;%=txtEndDate.ClientID %&gt;").val(),
                letter_filename: $("#&lt;%=lblRequestNo.ClientID %&gt;").text() + "_business_letter",
                status: '2',
                hr_letter_type_id: $("#&lt;%=ddlLetterType.ClientID %&gt;").val()
            };
            $.ajax({
                type: "POST",
                url: "&lt;%=ResolveUrl("~/HRLetterService.asmx") %&gt;/RegisterHRLetterBusinessData",
                data: JSON.stringify(parameter),
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (msg) {
                    __doPostBack('&lt;%=btnSubmit.ClientID.Replace("_", "$") %&gt;', '');
                },
                error: function (msg) {
                    alert("Error in saving the request. Please contact your administrator by sending the screen shot to unify.admin@unilever.com");
                    $(this).attr("disabled", false);
                    return false;
                }
            });
        }
        }
.
.
.
.
</code></pre>

<p>I haven't posted all the code as the code is fine and there is no error as such. But the only problem is at if statements. The if and else if statements get executed but the else part doesn't get executed. What can be the problem? Could you please help me? Thanks in Advance.</p>
