Here I am, with another problem. :) Maybe this time I'll get some responses. :P I'm using jquery.form.js plugin, to process forms with file fields. It's simple implementation.
$this.ajaxSubmit({
data: { 'ajax' : 'true' },
dataType: 'html',
success: parseRsp,
error: parseErr
});
It works on Chrome, Opera and new Firefoxes. It doesnt on Firefox 3.x and all versions of IE. Plugin throws some Server abort problem, but after some changes in code to debug it, I get it. Function getDoc(iframe) throws Permission denied in IE. But why? It's not cross-domain or something? I even add <script>document.domain = 'mydomain.com';</script> but that doesn't work either. Any ideas?
BTW. we are using APE Project. It probably makes some document.domain modifications, but on Chrome console, on page where is form, when I type document.domain i'm still getting mydomain.com, so...
I had a similar issue just now.
The problem was that I was setting the document.domain property in the parent document. The api document that is inside the iframe is vanilla json, and, as such, has no opportunity of setting a document.domain. Hence the permission issue.
So I had to remove the document.domain assignment from the parent.
Related
I'm getting the below error when trying to load GeoJson data in a map in IE9 using Javascript
Object doesn't support this property or method
My method call looks like below
myMap.data.loadGeoJson('https://storage.googleapis.com/maps-devrel/google.json');
I believe it has something to do with the .data call, as the only lines it happens on are ones that include .data in them. The "myMap" variable is initialized and set to a google map, and that all works fine, it's just when I try to load the geojson that it breaks.
Does anyone know why it would be breaking in IE9?
I've also attached a shot from Browserstack on similar errors using the google demo page...
UPDATE: I've talked to a google developer directly and it seems like a bug currently with IE9 (and I believe 8 as well), loading geojson does not work. If anyone does find a workaround though, it would be greatly appreciated. Even just knowing exactly why it's breaking would be good...
I had the same problem with IE.
Try this:
Open IE, Open "Tools", click on "Compatibility View Settings" and then uncheck "disable intranet sites in Compatibility View Setting" and then try to open your page.
That worked for me.
The sample code loads the GeoJSON from a different server (cross-domain).
The problem is that .loadGeoJson() is using XMLHttpRequest to load the data, and on IE8 and IE9 this doesn't work cross-domain.
This is the "Access is denied" error you can see in the console.
Try putting the GeoJSON on the same server.
Or, if you really need to load GeoJSON cross-domain and support IE9, use an ajax library, and the .addGeoJson() method. It would look something like this using jQuery:
$.ajax({
url: myURL,
dataType: 'json',
success: function(geojson) {
myMap.data.addGeoJson(geojson);
}
// Other options to configure for jsonp, etc.
});
Every development pipeline has 2 parts. FIRST to work hard and develop the application. SECOND to work harder and make it compatible with the great arrogant IE.
We have an AngularJS (v1.3.13) application without any server side code developed in Webstorm. We are making REST calls to service. Our application works fine on Chrome and Firefox without any Console errors. However when we try to open the page in IE11 or IE9 (not tried IE10), our page doesn't load. Console suggests we have 2 errors. One of them is Access is Denied on
xhr.open(method, url, true);
in angular.js.
There are number of posts on internet and none seems to be working. This is what I have tried.
Hosting app in IIS with changed Handler Mappings to support Cross Domain calls on an Application pool of .Net v4.0 (as suggested by a Senior)
Tried to disable to cache for HTTP requests.
Adding Domain in trusted site category and also adding locahost/IP to local intranet.
Changing request type to JSONP and trying to add Access-Control-Allow-Origin (with value of *) to headers.
Changing IE settings to allow Cross Domain calls.
Error is still chasing us. Even my colleagues have tried the same on their machines ending up with similar blow. Is there anyone to suggest me something on this.
It may be CORS and I may need to go for xdr (XDomainRequest) but not sure how to use it as error is in angular.js. I am certainly no expert on this so please suggest.
Screen shot of the error:
IE shows another error:
[$injector:nomod] Module 'ngLocale' is not available!
You either misspelled the module name or forgot to load it.
If registering a module ensure that you specify the dependencies
as the second argument.
http://errors.angularjs.org/1.2.16/$injector/nomod?p0=ngLocale which I am ignoring for now.
Please suggest me something on this.
Thanks.
I switched from 1.3.4 to 1.4.8 and that did the trick. No more Angular Access Denied in I.E. (Microsoft Edge 25 2015). I don't know why.
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-route.js/1.4.8/angular.min.js"></script>
Access is Denied on IE11 in AngularJS error have a solution on this link
I also got the same error while downloading Image from IE11. I have just added the following line in my code and It works.
window.navigator.msSaveBlob(blob, paramDataObject.fileName);
or
window.navigator.msSaveOrOpenBlob(blob, paramDataObject.fileName);
Have you tried xdomain? https://github.com/jpillora/xdomain it's a pure javascript CORS alternative.
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveOrOpenBlob(blob);
}
else {
var objectUrl = URL.createObjectURL(blob);
window.open(objectUrl);
}
Setting window.location or window.open in AngularJS gives "access is denied" in IE 11
I have a fairly complicated page built using JSP, JavaScript, jQuery, and css. It works fine in Chrome, Firefox, and IE10. However, it doesn't work in IE8 - JavaScript specific to that particular page doesn't load, the HTML is broken, some css is loaded, but not all.
The page called via an AJAX call:
jQuery.ajax({
url : url,
dataType: "html",
cache : false,
beforeSend : ...
Capturing network activity in Developer tools shows that the relevant script files have started to arrive, but only 155B-157B were received. Result code is 304, time is shown as under 1ms.
Same reporting for Chrome shows that the same JS files are 3-7-12KB in size, took 3-10ms to arrive, with HTTP code 200.
The same page requested via a regular GET request loads normally.
The problem looks like a known aggressive-caching issue in IE8, but somehow setting cache : false doesn't prevent 304 from happening.
How can I make this work?
Using jQuery version 1.4.2, IE8 on Win7. tc Developer server 2.8.2.
One of the JavaScript files being retrieved via the AJAX call contained, among other code, this method:
jQuery(document).ready(function() {
return validate...();
}
IE8 was not able to process it, and discarded all surrounding JavaScript.
I removed the lines above, and moved the validation method to the function that was called on Complete: of that AJAX call, and everything started working.
Major update at end of post
I'm initializing jPlayer with the following code. It's working great on all modern browsers and on mobile devices.
$("#jquery_jplayer_1").jPlayer({
supplied: "mp3",
swfPath: "/js/jQuery.jPlayer.2.4.0",
solution: "html,flash",
errorAlerts: true,
ended: function () {
console.log('ended event fired');
$.getScript('/js/random_show.js.php');
}
});
However testing in IE 8 and IE 7 I get the following error from the fallback SWF player:
If I open mysite.com/js/jQuery.jPlayer.2.4.0 the SWF loads without issue. I have tried letting the page sit for a while to see if that helped. It does not.
Per suggestion tried with working URL but have same error now with complete path listed. Path taken from browser after loading swf so most definitely correct. I had pasted code here but SO objected to body of post containing the URL... Here is new error message.
Another update: Tried linking directly to copy of SWF hosted by jPlayer per Josh D suggestion below. Same error. Upgraded to 2.5.0 from 2.4.0. Same error.
How can I get the fallback working?
Major update 12/12/2013
I have set up a sandbox copy of the site here: http://www.itsneworleans.dreamhosters.com/shows/happy-hour Hit Listen to see error message.
I have eliminated the HTML5 solution and use only the Flash. This allows any browser to trigger the error.
After dismissing the error Chrome debugger reports a 200 status for the swf so this is not a 404 swf problem. Anyone have an idea re this error?
After error below is dismissed.
Chrome error message
I added a jPlayer.ready() function with console output to my initialization. I found it only fired when the player was already visible AND there was no complaint about the Flash solution not being found.
After some more searching based on that result I found this post:
"check your styles. if your #jquery_jplayer_1 or its parent has
display=none, ready event never fires in such browsers as opera or
firefox. i mean flash object can't be hidden."
What was happening was that jPlayer's Flash solution was failing to load because my player had display set to none.
So now I have offscreened player via a negative margin-top and instead of animating height I animate margin-top. It's all working now.
Give the absolute path of your swf folder like www.mysite.com/js/jQuery.jPlayer.2.4.0.
This will help you to test whether the swfPath you gave is wrong or something else.
Did you try using swfPath: "http://jplayer.org/2.5.0/js/" instead?
If directly going to the path in your browser works and yet it doesnt work inside the script. It could be either:
MIME types - check if .swf is being served as application/x-shockwave-flash
Same origin (cross-domain) policy security, is the .swf file and the executing JS file located in the same domain and being served under the same protocol (HTTP and HTTPS).
If you are willing to post a demo link, we should be able to debug it.
just write "../js/jQuery.jPlayer.2.4.0" instead of this it will give you proper solution.
I face same issue in JWPlayer and its worked like this.
I am getting (NS_ERROR_DOCUMENT_NOT_CACHED) error when I try to access the Javascript code through firefox.I get this error in the contents tab of HTTPFOX.
I googled and set the parameters of browser in config file as specified in this site but it still doesn't work.
http://code.google.com/p/httpfox/issues/detail?id=20
Can somebody suggest whats going wrong since the same code works fine for safari browser..
If anyone is interested in a solution to this, I believe it's to do with the plugin noscript. Disabling it fixed this, but I have yet to work out what part of noscript was causing the issue. Will update if I find out.
Edit:My issues was with a twitter auth callback. In the Advanced settings of noscript under ABE, in the SYSTEM ruleset, on the line "Accept from LOCAL" I added "*.twitter.com". This allowed callback requests from *twitter.com to return to a local address.
On my macbook I had to uninstall firefox completely to correctly get the content of an ajax response with httpfox. This also implies to remove the firefox profile bij removing this Firefox folder (I could only find it via the terminal and not via Finder):
/Users/<YOURUSER>/Library/Application Support/Firefox
Then install firefox again and install the httpfox add-on.
I tried many cache settings also by entering about:config in the firefox URL however without succes. Be aware that removing the profile settings like I describe will also remove all your personal firefox customization. It concerned firefox 18.0.2 and httpfox 0.8.11.
We used to get the same error when our JavaScript made an XMLHTTPRequest to the server. On the server side, we had java, and the java response, the content type was not explicitly set to "text/html". When that was done
resp.setContentType("text/html");
the error went away.