views:

210

answers:

4

I'm fairly new to JQuery, having taken over this product, and I'm not sure the best questions to ask in troubleshooting this, so any help would be appreciated.

The situation: We have web pages that use JQuery, which run on correctly in our environment on IE6, IE7, and Firefox. They silently die as well, so any tips on how to gather useful troubleshooting info/logs would help too.

However, on a client's site, when using IE 6 none of the AJAX/JQuery calls seem to work, but they do in Firefox.

I'd appreciate help in where to look and what questions to ask in narrowing down the problem. For example, what setting in the browser might be most important? Does the version of the Java JRE matter for Javascript? Are their any domain settings which might affect this?

Thanks.

A: 

Java doesn't matter for JavaScript. So you can use any version of JRE in your server.

There are some restrictions in making cross-domain ajax call.

For Firefox with you don't have Firebug add-on install it.

More details about what you are trying to do would help figuring out.

Daniel Moura
A: 

I've encountered this issue before.

I agree with Daniel regarding cross-domain ajax call restrictions. JRE and JavaScript are apples and oranges so no problem there.

Check your security settings on the server and in IIS.

You may want to consider installing firebug lite so you can see what's going on behind the magic curtain in IE6+. This should at least help you better troubleshoot this issue.

Also, if you can provide some code that may help us better assist you.

pixelbobby
+1  A: 

a) always be sure that any console.log() calls are commented out/removed. this has been the bane of my existence for cross browser "it-works-here-but-not-there" issues.

b) IE6 is funky with ajax. sometimes it doesn't like the $.post() call, but will allow $.ajax("post"....) call.

c) try firebug lite to help debugging in IE. although, the developer's toolbar helps a bit.

d) ajax calls will not work outside your domain. i.e. if you are on example.com and you are trying to call to otherdomain.com, it will silently fail. i'm not 100% sure about subdomains.

contagious
A: 

I had this issue where ajax requests in jquery weren't working in IE6, but were working everywhere else (including >= IE7). What fixed it was adding a preceding slash to the urls I was making calls to:

$.get("/callback.php") //not $.get("callback.php")
jeffthink