开发者

Javascript executing "else" only when location.reload is present?

I'm trying to have the page refresh if and only if there is no html (errors) returned by the $.post() function. The code works just fine when I don't have location.reload(true); present. When I do have it present, the page speed seems to have load speed decide if it开发者_运维问答's going to validate or not...

I tested this, and found that the code worked 80% of the time when run on a remote server, but it only worked 50% of the time when run locally using MAMP. Why, and is there a way to fix this?

Code & everything: http://jsfiddle.net/sman591/ZHays/


why you are having

var messagehtml = $('.window #message').html(); 

intead of var messagehtml =$('.window #message').html()

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜