开发者

Post method not working in firefox

开发者 https://www.devze.com 2022-12-13 23:59 出处:网络
The following ajax function call not retrive the data in firefox3.0.16 if i use开发者_开发百科d post type,But it is working good in IE7 ,if i used get method i can retrive the data in both the Browser

The following ajax function call not retrive the data in firefox3.0.16 if i use开发者_开发百科d post type,But it is working good in IE7 ,if i used get method i can retrive the data in both the Browser(IE and Firefox).Why?

function ABC() {
        $.ajax({
            type: 'post',
            dataType: 'json',
            url: Url,
            success: XXX
        })
    };


Make sure you are returning the correct content-type header from the server. You will need "content-type: 'application/json'". Also make sure that JSON is properly formatted, although usually IE is more strict than Firefox.


try adding "data:{}" & "contentType: "application/json; charset=utf-8"


These problem occured when i host the application,in Local it work in both the browser

0

精彩评论

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