I have code updating a dropdown, and then I fire the "change" event manually. It works as it should in firefox, opera, etc., but not in Internet Explorer. Any idea why?
The code below.
$(".bringFraktvalgRadio").click(function() { var selectedValue = $(".bringFraktvalgRadio:checked").val(); $("#<%= dropDeliveryOption.ClientID %> option[value=" + selectedValue + "]").attr("selected", true); $("#<%= dropDeliveryOption.ClientID %>").trigger("change"); });
Look at my question for something like this with a checkmark. Check the answer I gave has a link and don't forget to use blur and focus.
Sorry, but the change event does NOT work as it should in IE (mainly IE6).
1: , , "click" , "click".
2: - . jQ :
$("#yourSelect").bind('myChange',function(){ //do the chacha })
:
$("#yourSelect").trigger("myChange");
Source: https://habr.com/ru/post/1747511/More articles:Does Javascript have the effect of a printed version of a site? - javascriptTarget Deployment Tool for iPhone Xcode - iphoneToggleclass doesn't seem to switch the class, what am I doing wrong? - jqueryLINQ Group For a project in a non-anonymous type? - c #interface com.sun.xml.ws.developer.WSBindingProvider not visible from class loader - javaHow to Install a Custom DriverConnectionProvider with Fluent NHibernate - nhibernatehibernate distributed second level cache options - javaIs this sql statement correct? - sqlOnly the first table is created in the creation of the created table statement - androidhow to call C ++ dll from a Windows C # application project - c #All Articles