-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IE9/8 issues - Soap call not initiating to a cross-domain url #80
Comments
Hey @arunmenon1975 run through these https://github.com/jpillora/xdomain#faq--troubleshooting and report back |
When the issue is indeed a problem with jquery.soap please let me know! =] @jpillora: xdomain looks nice! I'll have to look into that! ;) |
After some tinkering, reading through the issues in both the repos and the FAQs mentioned by @jpillora in the comment above, i did manage to get it fixed. It did require a change in jquery.soap(as well as changes discussed at x-domain). A round-up of the changes:
// second attempt to get some progres info (but still a no go)
// I still keep this in tho, we might see it working one day when browsers mature...
xhr: function() {
var xhr = new window.XMLHttpRequest();
......
......
Thanks for this fantastic script - it did work for all my requirements until this issue surfaced. Closing this issue for now. I have already closed the issue opened at the xdomain reppo. Please note: The fix was noticed only during early testing. May re-open if issue persists while i test a little more intensively. |
Thanx for the information, could you sent me a pull request when you have done further testing? |
WRT issue doedje#80 (doedje#80) commenting out the xhr function below for IE8 and IE9 compatability. Issue exists when used alongside any script that modifies the XMLHttpRequest object like, for example, the xdomain or xhook libraries. This could be explicitly enabled by users on a per-case basis if it is mentioned somewhere in the readme.md file.
I just sent in the pull request. Please view it at #82 |
At the outset, i am not sure if it is an issue with the script - i am mostly looking for some pointers to an issue that appears only for IE9 and IE8
I have this script running perfectly fine in IE10+, Chrome, Firefox and Safari and the stock Android browser. An example implementation is thus:
A link on my page (say, the homepage) makes an AJAX request and pulls in a form. The user enters data and submits the form to a PHP file. This PHP file returns data (echos) in the form of a
<script>
chunk that has the$.soap
object with all the required params filled in. The URL to send the soap data is a cross-domain request. All my cross-domain requests are handled via x-domain.In browsers other than IE9/8 the complete flow works perfectly fine. The
$.soap
call to the external domain is intercepted by x-domain, which returns back the data and i can go ahead using the response.In IE8/8, the
$.soap
call is not initiated at all. I am logging the data inbeforeSend
which shows correct information, so the buildup is fine. The next logged error is the xhr errorwhich returns(using IE's inspector):
description: "Unable to get property 'addEventListener' of undefined or null reference"
message: "Unable to get property 'addEventListener' of undefined or null reference"
name: "TypeError"
number: -2146823281
And the script subsequently fails at Line: 477 which reads:
I guess the error is because the response is null or undefined.
My $.soap call looks like:
I noticed the script has a commented out line
//crossDomain: true,
I tried removing the comment but the error remains.
I am not sure if this is a Stack Exchange sort of question, but i thought id ask here since there is a possibility that users with similar issues may attempt to search through the issue lists here.
Edit:
jquery version: 1.11.2
jquery.soap version: 1.6.4
Another Edit:
Opened an issue at the xdomain repository as well as i am currently not sure what could be issue.
The text was updated successfully, but these errors were encountered: