Jump to content

Dynamic dropdown list with append method not working in Internet Explorer


Recommended Posts

Hi guys,my problem is that in ie11 my dynamic drop down select list not showing at all!!,, i mean that in firefox and chrome is working except ie11,, i m using append method like that,

function loadUsagesDdl(ajaxUrl) {    var reportsUrl = $(document).myfunctions('reportsUrl');    $.ajax({        dataType:'json',        type: 'GET',        url: ajaxUrl,        cache:false,        success:function (response) {            var ddl = $('#ddl_usageCode');            var opts = response.Records;                     $.each(opts, function(i, item) {                              // ddl.append($("<option />").val(item.usageCode).text(item.description));                         $("<option></option>",{                          value: item.usageCode,                          text: item.description                     }).appendTo(ddl)                            });            var firstUsageCode = response.Records[0].usageCode;                            loadDynamicDdl(reportsUrl + '/ddlPaymentPeriods?usageCode=' + firstUsageCode, 'ddl_periodFrom');            loadDynamicDdl(reportsUrl + '/ddlPaymentPeriods?usageCode=' + firstUsageCode, 'ddl_periodTo');        },        error:function (jqXHR, exception) {            alert("There was an error loading dropdownlist.");        }    });}

what is going wrong in ie? :( please guys any help would be really appreciated..Thank you all

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...