开发者

jQuery Ajax load Firefox Compatibility Problem

So to understand the problem I'm having, do the following steps in the latest versions of one of (or all of if you really want to I guess) Chrome, Opera, Safari, and Explorer at this link: http://isaaclean.com/test/test2

  1. Click on "Blog" and it will Ajax load a list of links in the column next to it.
  2. Click on "Lorem Ipsum" and it will Ajax load开发者_StackOverflow an entire page of lorem ipsum into the #content div next to the list of links.
  3. Click on "dolor sit amet" and it will Ajax load a new page that says "Y U NO WORK PROPERLY?! D:" into the #content div.

So that's what supposed to happen. Now if you open the latest version of Firefox (6.0.1) and you go through the same steps, when you click on "dolor sit amet" instead of Ajax loading in #content it will directly follow the link to ajaxifyit.html.

Now I think this happens because when a link in #content loads the new page into itself, Firefox cancels the current script running on it. In fact, you can actually see the script running properly for a brief moment because you will see the "Loading" message appear on top. Also, you can hit back and you will see the "Loading" message is still there. You can view the JavaScript running for this page at: http://isaaclean.com/test/test2/scripts/contentlink.js

The reason why there's an if statement is because if the link in #content is not linking to somewhere within the isaaclean.com domain, it won't Ajax load the page but instead directly link to it. You can see this part of the script works when you click on "laoreet semper nibh ac" since it will load Google properly.

I'm not really sure how to fix this at the moment, so that's where I need help. :/


This seems like a problem to be asked of the Firefox team themselves... You might have a better chance of finding an answer by submitting a bug to the FF team. Maybe?

Here is a search I did on BugZilla for "AJAX element loading into itself". It returns a TON of results. I think you might to well to try there at least.

Best of Luck! Isaac

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜