Reputation: 1198
here is my following code
<select id="SelectEmptyPoints" multiple="multiple">
<option>Point 1</option>
<option>Point 2</option>
<option>Point 3</option>
<option>None</option>
</select>
onchange funtion :
function SetEmptyPoints(param) {
var length = param.selectedOptions.length;
}
this function working except IE... i can't get the selectedOptions(multiple selection) length.. how to resolve.. but this function is working chrome, firefox,.... it's not working only IE
Upvotes: 0
Views: 2160
Reputation: 7
This code will not work on IE 9.0 or its previous versions. There are some other tags which won't work on IE. Try using Latest IE, the code will work.
Upvotes: 0
Reputation: 388316
Looks like the selectedOptions
property is not implemented in IE yet so you can use a cross platform solution like
function SetEmptyPoints(param) {
var length = $(param).val().length;
}
Upvotes: 0
Reputation: 446
You can use jquery:$("#SelectEmptyPoints").find("option:selected").length
.It wiil work on ie11.I've tested.
Upvotes: 1