How to disable a dropdown which is in span --- Jquery
<p>Hi i have a Dropdown </p>

<pre><code>       &lt;div class="dvPortOmmisionRightInner"&gt;
        &lt;div style="float: left"&gt;
             &lt;select id="ddlAction" onchange="showSelected(this.value)"&gt;
                &lt;option value="-1" selected="selected"&gt; &lt;/option&gt;
                &lt;option value="1"&gt;Indirect Call&lt;/option&gt;
                &lt;option value="2"&gt;Cargo Diversion&lt;/option&gt;
                &lt;option value="3"&gt;Cargo Rollover&lt;/option&gt;
                &lt;option value="4"&gt;Shift Cargo&lt;/option&gt;
            &lt;/select&gt;
        &lt;/div&gt;
    &lt;/div&gt;

    &lt;div class="dvOmmisionPortinner"&gt;

       &lt;p&gt;Service&lt;/p&gt;
        &lt;span class="ShowSpan1" style="float: left"&gt;
            &lt;asp:DropDownList ID="ddlService" runat="server" ClientIDMode="Static" CssClass="ddlService"&gt;&lt;/asp:DropDownList&gt;
        &lt;/span&gt;

        &lt;p&gt;Voy&lt;/p&gt;
        &lt;span style="float: left" class="ShowSpan2"&gt;
            &lt;select id="ddlVoy" name="ddlVoy" class="ddlVoy"&gt;&lt;/select&gt;
        &lt;/span&gt;
</code></pre>

<p>Here based on selection of Select i must disable few Dropdowns ...,</p>

<p>First when i click on Indirect Call my ddlService dropdown must be disabled..</p>

<pre><code>    var myDivs = new Array(1, 2, 3, 4);

    function showSelected(sapna) {
        var t = 'ShowSpan' + sapna,
            r, dv;
        r = 'ShowSpan' + myDivs;

        dv = document.getElementById(r);
        if (dv) {
            if (t === r) {
                        // Here my ddlService must get Disabled...


           }
          } else {
                dv.style.display = 'none';
            }
        }
        return false;
    }
</code></pre>

<p>Is there any other way to disable Dropdown based on Selection value???</p>

<p>When iam trying to diable this dropdon it is not getting disabled.</p>

<p>My Trials are like</p>

<pre><code>    $("#ddlService").attr("disabled", true);
    $("#ddlService").attr("disabled", "disabled");
    $(".ShowSpan1").attr('readonly', true);
    $(".ShowSpan1").attr("disabled", "disabled");
</code></pre>

<p>When i disable my SPAN its getting into Readonly but still i can access Dropdown 
Is there any other way to Disable a Dropdown?</p>

<p>Thanks in Advance</p>
