The following ajax call, made from a checkbox, somehow fails in Internet explorer, while it works in Firefox and Chrome.
<input type="checkbox" name="16086" id="16086" value="1" onclick="jQuery.ajax({type:'POST',dataType:'html',data:'checked=' + thi开发者_如何学Cs.checked,success:function(data, textStatus){jQuery('#test_div').html(data);},url:'/tour/changeArticleAjax/article_id/16086'})" checked="checked">
(copied from chrome's console)
Checking the server access logs proves that IE does in fact make the call, so i concluded it must be a problem in the handling afterward. I have been looking for hours now, but i can't find the problem.
Probably not relevant: The ajax call in question is generated by the php framework symfony, using the jq_remote_function function.
Tested in:
IE 9 - Fails,
IE 8, emulated by IE9 - Fails
IE 7, emulated by IE9 - Fails
Chrome 13.0.782.99 - Works
Firefox 5.0 - Works
Does anyone see whats wrong here?
Thanks in advance!
I havn't tested this.
Try renameing the ID to start with a letter:
Naming rules:
- Must begin with a letter A-Z or a-z
- Can be followed by: letters (A-Za-z), digits (0-9), hyphens ("-"), underscores ("_"), colons (":"), and periods (".")
- Values are case-sensitive
More info: ID attribute
精彩评论