jQuery Change Value of ASP.NET AJAX CascadingDropDown -
I can use jQuery to change the value of a cascading dropdown, but events that target the fire to control The reason for the drop down of children is that it never happens with the data:
$ ("# & lt;% = ddlFromCompetition.ClientID%>"). Change (function () {var fromValue = $ ("# & lt;% = ddlFromCompition.value; $ (" # & lt;% = ddlToCompetition.ClientID%> "). Val (fromValue); // The value of the reasons is to change, but the child is not updated}};
To be clear, ddlFromCompetition
and ddlToCompetition
Parents / children are not a child of ddlToCompetition
which does not update using the above code when the mouse is selected using the ddlToCompetition
Child dropdown update expected .
I try to fire the event fire to .change () . ("# And lt;% = ddlToCompetition.ClientID%>"). But this does not work.
you trigger () event
$ ("# & Lt;% = ddlToCompetition.ClientID%>") is required. Trigger ('change');
JQuery Document:
Apart from this, because ddlFrom competition is the first change event handler for ddlFrom competition, you should be able to change ...
var Fronvlua = $ ( "# & lt;% = Ddlfromkpetishnkkliantid% & gt;"). Val ();
to ...
var fromValue = $ (this) .val ();
Comments
Post a Comment