Thursday, October 25, 2012

Some IE9 Grief!

Today I really hated IE9 even more!

 

I had this ajax:

    

    $.ajax({

        type: "GET",

        url: "Reportviewer.aspx/GetSomeData",

        contentType: "application/json; charset=utf-8",

        data: "{}",

        dataType: "json",

        success: AjaxSucceeded

    });

    function AjaxSucceeded(result) {

        console.log(result)

        $(result.d).each(function () {

            ...

        });

    }

 

In IE9 the ajax just don’t want to call the success function “AjaxSucceeded” but in Crome, Firefox it returns just fine.

 

After googeling like crazy I found out all instances of console.log() need to be removed from your script in order for it to work in IE9 without it being in developer mode.

 

Well now I know!