Jquery load() fails in IE
I know this is a well known problem, however the other posts did not help much. So I have two pages "A" and "B". On page "A" I am refreshing the options in a select field with a jquery ajax load as follows. "changeme" and "replace" are selects.
$("#changeme").change(function(){
if($("#changeme :selected").val()>0){
var resource = "<c:url value="/coursemodules/categoryselect/"/>"+$("#changeme :selected").val()+" option";
$("#replace").load(resource);
}else{
$("#replace").html('<option value="0">UN-CATEGORISED</option>');
}
});
The URL points to page "B" which has new select-options nested in other template specific div-tags, hence the space and option appended at the end of the url above. Now all this stuff works perfectly except in IE. The updated select just goes blank with no o开发者_如何学Cptions on IE. Please help, thanks.
Make sure the URL being request is valid. Other browsers may try to fix problems in the URL differently and succeed, but
""+$("#changeme :selected").val()+" option";
Looks like it resolves with the JSTL to
"/coursemodules/categoryselect/WhateverValue option"
The ending looks odd WhateverValue option
... Does going to one of these URLs return the expected response?
精彩评论