jQuery AJAX GET html data IE8 not working

7.7k views Asked by At

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);
            });
3

There are 3 answers

0
İlker Korkut On BEST ANSWER

I solved the problem , in php file there was a unclosed div and I removed it.

2
Luc Laverdure On

Try this:

        $.ajax({
            url: "_veri.php?t=icerik_getir&id="+tabopen,
            success: function(data){
                $(".tab-contentmenu").html(data);
            }
        });
6
jk. On

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
    });