Reputation: 1
I am using select2 3.4.2 in my code on a simple input control.
I am populating the control from a web service which returns me the values in Json.
The control works fine in IE8 and above and also in Chrome and Firefox. Is there any fix to make it work in IE7.
Please find my code below:-
<input type="hidden" class="bigdrop" name="optionvalue" id="selectbox-o" style="width: 350px;" />
$(document).ready(function(){
$('#selectbox-o').select2({
placeholder: "Choose a Manager",
allowClear: true,
ajax: {
url: managerServiceURL + '/GetManagerNames',
type: 'POST',
params: {
contentType: 'application/json; charset=utf-8'
},
dataType: 'json',
data: function (term, page) {
return JSON.stringify({ q: term});
},
results: function (data, page) {
return { results: data.d};
}
},
});
});
Upvotes: 0
Views: 2678
Reputation: 300
select2 is not supported in IE7. See browser support http://ivaynberg.github.io/select2/
Upvotes: 1
Reputation: 1417
I think the reason is that you have a trailing comma after the "ajax" block. This breaks JavaScript on IE7.
Upvotes: 3