开发者

jQuery ajax problems with webkit browsers

Hello

I'm adding some ajax features to a site and I have very strange problem.

On webkit browsers the ajax request aren't working.

I have no idea where is the problem.

I noticed that if I leave only one ajax request the Safari(windows) is doing it right, but that its not what is happening to the Safari(Mac) and Chrome(windows).

The javascript console on firefox says that there are no errors.

Ah... i forgot to mention that I use jQuer开发者_StackOverflow社区y(1.4.2) same on jQuery(1.4.3).

Does somebody have any idea what is happening?

Thank you!

Edit: Some code.

$.post("http://address-to-the/file.php", { action : "get_location", location : location.href }, function(response){
if(response.status == "OK"){
$("#main-menu").html(response.code);
}else{
alert(response.message);
}
}, "json");


You might be having some variable name clashes, since there's a window.location and one of your object property names is location, so try putting your object names in quotes:

{ "action" : "get_location", "location" : location.href }

instead of:

{ action : "get_location", location : location.href }
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜