Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

problem with ajaxcontroltoolkit combobox and jquery

$
0
0

Hi, on my page I've a lot of ajaxcontroltoolkit comboboxes. The problem I've is that I should capture when a value of one of the combos is changed to check it with a value, and if it is correct enable another combo.

I've been looking info about it on google but I haven't found nothing that works, all I've found is for a dropdown. I've found a possible solution (http://stackoverflow.com/questions/1457813/how-do-i-bind-a-javascript-event-handler-to-the-ajax-control-toolkit-combobox-wh):

Sys.Application.add_load(initializePage);

    function initializePage() {
        $find('PlantDropDown').add_propertyChanged(function(sender, e) {
        if (e.get_propertyName() == 'selectedIndex') {
        var newValue = sender.get_textBoxControl().value;
        // persist selected value here...
        }})
    }

But I haven't been able to do it work.

I've also tried with .val(), .text(), .attr('selectedIndex')

var m = $('#<%= cboHemo.ClientID %>').attr('selectedIndex');
alert(m);



I can't go to server side to check and enable the combos. 

 My aspx code:

<tr><td class="td2camposxfila"><asp:Label ID="lblHemo" runat="server"></asp:Label></td><td class="td2camposxfila2"><asp:ComboBox ID="cboHemo" runat="server" CssClass="combo" AutoCompleteMode="None" 
                                            RenderMode="block" ItemInsertLocation="OrdinalText" DropDownStyle="DropDownList" 
                                            AutopostBack="false" CausesValidation="false" TabIndex="5" ></asp:ComboBox></td><td class="td2camposxfila"><asp:Label ID="lblCateter" runat="server"></asp:Label></td><td class="td2camposxfila2"><asp:ComboBox ID="cboCateter" runat="server" CssClass="combo" AutoCompleteMode="None" 
                                            RenderMode="block" ItemInsertLocation="OrdinalText" DropDownStyle="DropDownList" 
                                            AutopostBack="false" CausesValidation="false" TabIndex="6" Enabled="false" ></asp:ComboBox></td></tr><tr><td class="td2camposxfila"><asp:Label ID="lblTipoCateter" runat="server" Enabled="false"></asp:Label></td><td class="td2camposxfila2"><asp:ComboBox ID="cboTipoCateter" runat="server" CssClass="combo" AutoCompleteMode="None" 
                                            RenderMode="block" ItemInsertLocation="OrdinalText" DropDownStyle="DropDownList" 
                                            AutopostBack="false" CausesValidation="false" TabIndex="5" Enabled="false"></asp:ComboBox></td><td class="td2camposxfila"><asp:Label ID="lblDialisis" runat="server"></asp:Label></td><td class="td2camposxfila2"><asp:ComboBox ID="cboDialisis" runat="server" CssClass="combo" AutoCompleteMode="None" 
                                            RenderMode="block" ItemInsertLocation="OrdinalText" DropDownStyle="DropDownList" 
                                            AutopostBack="false" CausesValidation="false" TabIndex="6" ></asp:ComboBox></td></tr>

Any help will be appreciated. Thanks in advance.


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>