开发者

IE not displaying ajax call results from database

question says it all... code:

$(document).ready(function() {
                dataToLoad = 'showr开发者_运维问答esults=true';
                $.ajax({
                    type: 'post',
                    url: 'submit.php',
                    datatype: 'html',
                    data: dataToLoad,
                    async: true,
                    success: function(data){

                        $('#results').html(data);   
                    },

                });
});


You should use

dataType: 'html'

instead of

datatype: 'html'

and remove the trailing comma at the end (IE<=7 will throw error)

If the problem persists, add an error callback to see if there's an error

error: function(xhr, status, errorThrown){
   alert("Error:\n" + status);
}

Hope this helps. Cheers

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜