Javascript error when sending XMLHttpRequest in IE7 - javascript

I have a bit of a strange problem. For one of my clients I've added some ajax functionality to their website. To get the context; it's a website for a travelagency and pricetables are generates by ajax-calls to reduce serverload and improve user experience.
Only now I received an email where they say it is not working in IE7. So, to test this I first installed IETester but this almost crashes every single time I only open a website. So I've downloaded a trialversion VMWare Workstation and installed a virtual XP machine with IE7 (because IE8 is on my primary Win7 install). What a hassle to simulate an error eh?! ;)
Anyway. After some debugging I think it's the xmlHttpRequest status property, when I try to alert this status in the corresponding javascript function IE shows an exclamationsign at the leftbottom corner with some vague 'not further defined error' message while in IE8, FireFox and Chrome this is no problem at all.
So I figured I might have been using the wrong XMLHttpRequest object. But then again, the first call which is also made to intiate the first pricetable for the closest month works just fine. Just to be sure I googled which object should work for IE7, now I'm using Msxml2.XMLHTTP and the initial load goes well.
When I click an <a onclick="callToFunction(with, correct, params)">click</a> it gets into the function to update a <div> but then it sort of freezes. I found out that the xmlHttp.readyState is 4 but I can't output the xmlHttp.status, then the 'not further defined error' message shows again at the leftbottom corner.
My question after a bit of a long evening trying to solve this, do you guys have any clue what might be the problem?
Example:
http://www.bergenmeer.nl/50/oostenrijk/tirol/gerlos/residence-zillertal.html
Click tab 'Prijzen en aanbiedingen' (Prices and special offers) then click another month in the bar below, e.g. jan, feb, maa.
Note, the disfunctioning only appears in IE7.

In IE7 you could try using native window.XMLHttpRequest.
For what it's worth, I once had an issue which was resolved by removing xmlhttp.setRequestHeader("Connection", "close"); (which I did not see in your code...)

Related

What is the reason behind IE11 long running script issues?

I wanted to understand why does the IE11 respond with a long running script issue and becomes unresponsive till some time.
Surprisingly, this happens randomly
eg. Let's say on page load I call an API which responds with a bookings.
CASE 1: When number of bookings are less than 10 , it works perfectly FINE....
CASE 2: When number of bookings are more than 10 , it encounters this long running script issue
As per the suggested fixes for this issue I see only IE11 Browser browser configuration /system settings changes only Eg: https://appuals.com/long-running-script-ie11/ which can't be triggered on customer side.
Would be thankful if anyone provides some clarity on this issue and possible fixes apart from config changes!!

Problems testing XHRs/Fetch with Chrome 42 on OS X

We are using Marty.js (and React.js) in our webapp.
As I read in the Marty.js docs they're using the fetch-polyfill to communicate with the server over http. Everything fine so far ...
While testing in Google Chrome (currently v42) first I noticed that the body of the request isn't shown (but sent ?!?) and then that I can't "replay XHR" from the dev-tools.
Can anybody tell me why this is the case?
update 04/26/15
Because it seems to not have anything to do with marty.js I removed it from the question's title.
I believe what you're seeing is related to two issues in MartyJS' github.
https://github.com/martyjs/marty/issues/308 (success function called regardless off http status code returned)
https://github.com/martyjs/marty/issues/293 (martyjs not deserialzing json properly in certain browser setups) <-- this is the one you're having a specific issue with it looks like.
There was an update to the library to fix both of these. I recommend upgrading. We haven't had any problems since grabbing the latest as of a week ago (0.9.14). I believe a new version has already been released (0.9.15) while work on 0.10 is being done in parallel.

Javascript error happening only in IE, how do I track it down? (link to site)

I am using Lemonstand (an e-commerce CMS) and after going live with our site we started hearing that IE wasn't working as expected.
I can't track down what's going on.
The website is at http://store.kramerknives.com, the problem is when you go through checkout in IE - any of the Ajax functions throw a Syntax error (it says line 8, which is a Meta Description tag, rather unhelpful), as well as an 'error 80020101'.
This causes it:
clicking 'My billing and shipping addresses are the same'
navigating backwards on the breadcrumb
Is this problem too specific for Stack Overflow? I am at a loss, I have been tweaking things around but I'm unfamiliar with Developer Tools in IE to fully grok what's breaking what.
Running under the IE9 debugger in IE9 mode, I see an error here on the execScript() line which is getting called after an ajax call when going to the next step in the cart:
if (window.execScript){
window.execScript(text);
} else {
Which basically means a bunch of your initialization javascript code after an ajax call doesn't get executed and thus the page doesn't work properly.

why/where the error "Permission denied for <http://ad.yieldmanager.com> to call method Location.toString"

EDIT: I've added clarifications in response to a comment; where it's possible and meaningful, those added carifications are in italic font style.
I've posted this question on Firefox groups as well as here on SO.
There are at least 25 related questions on SO, a few representative questions being:
Flash bug
cross-domain issue
just a mystery
FF XPCOM problem
There are ~15 accepted answers, none of which seem to apply here. Because there are so many questions and accepted answers, I am assuming that my question addresses an issue that developers have often tripped over.
I have written a straight-up web page that, in my view, is completely normal and usual. I have nothing unusual on the page, nothing that I -- and probably you and all web developers -- haven't been using for the past ten years at least.
I'm viewing the page I've developed with Firefox 3.6.16 with Firebug 1.6.2.
With varying periodicity, but typically every 30 to 60 minutes for 65% of the incidents, an error message shows up in the Firebug console:
Permission denied for <http://ad.yieldmanager.com> to call method Location.toString
Most of these message point at yieldmanager, but I see complaints about doubleclick and interclick as well. FB gives me no properties about the error messages.
View->Source of the page shows nothing about yieldmanager or any other offender.
There are calls to AdSense, but removing that code entirely changes nothing wrt the error messages.
There are about 3000 line of plain, vanilla-type JavaScript on the page but nothing at all exotic that I can see.
I have not explicitly or (I believe) implicitly included any framework code: no JScript, xjs, MooTools, not anything.
Question: How can I find out who is calling Location.toString( ); and how can I get rid of that guy?
This may not be the case with you at all, however be aware that firebug will display error messages in your console if you open-up another window and browse to a site that has these calls. In short, these errors may not be related to your page at all.
Per my comment, try disabling extensions (safe mode) and check Firebug's XHR tab if you haven't already.

Ajax problem using MooTools/jQuery - p.onStatusChange is not a function

I get the following error in firebug in Firefox 3 with both MooTools and jQuery:
"p.onStatusChange is not a function".
I've noticed this error frequently in firebug since one of the latest updates of FF3. However, it has started appearing with code that hasn't been changed in some time and that was not reporting errors previously. The errors happens when ajax results are returned. It shows up in different applications that use separate javascript libraries, MooTools and jQuery.
Does anyone have any idea why these errors are appearing? My intuition tells me that it is something in Firefox that changed, but I can't find any information online currently. The ajax calls still work fine, but I am wary of just going with my intuition and leaving script errors in my code.
Thanks,
Jason
I get it in tabBrowser instead:
chrome://browser/content/tabbrowser.xml
(4) errors occur:
p.onStatusChange
p.onProgressChange
p.onStateChange
p.onSecurityChange
What I found was that the add-on "PDF Download" was causing these errors. The best way for me to check was to go to a page that produced the errors, turn off all the add-ons, and turn them on one-by-one (starting with Firebug). Instead of going one-by-one, I actually turned them on in lots of 3 to help identify the problem sooner.
Here is the reference for the function NsIDownloadProgressListener. It looks like it has been deprecated.

Categories