问题
This is the code but it's not working on IE8 & 7 (IE9 , chrome,firefox, safari,opera are all ok). I have tried a lot of things (meta utf-8 code, php header code, taking alerts, cache:false).What can i do , i need help. Thanks for your interests.
var request = $.ajax({
type:"GET",
url: "_veri.php?t=icerik_getir&id="+tabopen,
dataType: "html",
});
request.done(function(msg) {
$(".tab-contentmenu").html(msg);
});
EDIT:
alert gives me the data of requested in all browsers but still no requested data in ".tab-contentmenu" , what should i do?
var request = $.ajax({
type:"GET",
context: document.body,
url: "_veri.php?t=icerik_getir&id="+tabopen,
dataType: "html"
});
request.done(function(msg) {
$(".tab-contentmenu").html(msg);
alert(msg);
});
回答1:
I solved the problem , in php file there was a unclosed div and I removed it.
回答2:
IE can get indigestion from syntax errors in js. Try removing the unnecessary comma:
var request = $.ajax({
type:"GET",
url: "_veri.php?t=icerik_getir&id="+tabopen,
dataType: "html" //removed the comma here
});
回答3:
Try this:
$.ajax({
url: "_veri.php?t=icerik_getir&id="+tabopen,
success: function(data){
$(".tab-contentmenu").html(data);
}
});
来源:https://stackoverflow.com/questions/8792815/jquery-ajax-get-html-data-ie8-not-working