1

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
  • Not working how? Any errors in the console? Commented Jan 9, 2012 at 17:50
  • no error, it's not getting data in ie8 & 7. also alert(msg); there is no content about the data. Commented Jan 9, 2012 at 17:53
  • request.done(function(msg) { $(".tab-contentmenu").html(msg); alert(msg); }); it takes the data html on alert but not shown on the page. Commented Jan 9, 2012 at 18:27

3 Answers 3

5

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

Sign up to request clarification or add additional context in comments.

Comments

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

6 Comments

@user1136403 If the element you are targeting is not valid HTML (opening and closing tags) or it is HTML 5, it may fail in IE.
no it's valid and not html5, on IE9 it's working but on ie8 & 7 not working.
request.done(function(msg) { $(".tab-contentmenu").html(msg); alert(msg); }); it takes the data html on alert but not shown on the page.
There is no problem in html i think , because its working on ie9 and other browsers also its working without ajax html codes in .tab-contentmenu area (this system is tab system and this ajax codes are under the click trigger event and also this codes are under the without click event default in default tab function so both of them are'nt working.
|
1

Try this:

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

2 Comments

Can you tell me what's appearing in the error log of the javascript console in IE? Press F12 for developer tools to display.
i looked with that, but nothing on there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.