starting this morning I'm having difficulties executing Javascript code on Firefox. This simple code example:
<html>
<head>
<script type='text/javascript'>
alert('HEAD!');
</script>
</head>
<body>
<script type='text/javascript'>
document.write('<p>BODY</p>');
</script>
</body>
works as expected on
Safari - Version 7.0.2 (9537.74.9)
Chrome - Version 33.0.1750.149
but NOT on Firefox - Version 27.0.1. I'm getting a blank page here, page source looks good.
Firebug says:
No Javascript on this page
I've already
checked the about:config => javascript.enabled true
disabled all extensions and restarted Firefox
restarted Apache/MAMP PRO (2.1.4) - doesn’t even work for me via intErnet, so this should be not related to MAMP (http://shoco.biz/test.html)
restarted the computer (Mac OS X 10.9.2)
Any ideas? Thanks in advance...
Try opening firefox in safe mode help -> Restart with Add ons disabled then reset everything
Related
In our software, we have a page with a link that opens a page within the same site in a new tab using target='_blank'. When the user is done working on that newly opened page, they click a button and when the page refreshes, it calls the following code.
window.opener.location.href = window.opener.location.href; window.close();
This has worked fine for ages but within the last week or so stopped working in all browsers. I can't seem to find anything when I google it about a new security restriction being implemented that would cause this. Any idea what's going on and how to get it working again? I've tested the following code in chrome, firefox, edge and IE11. In all but IE11 window.opener is null. In IE it is not. Is there possibly a new security setting in browsers that would cause this?
<html>
<body>
click me
</body>
</html>
<html>
<body>
<script>
alert(window.opener === null);
</script>
</body>
</html>
I am not sure which version of chrome browser you tested your code on. To avoid "tab-napping" attacks, many browsers have started implementing noopener behavior by default for anchors that target _blank.
Chrome enabled noopener behavior in release 88.
Safari also enabled this in release 68.
I couldn't find any reference to IE 11 change. But it's worth trying adding rel="opener" in anchor tags with target=_blank
Microsoft IE8 and IE9 used to offer functionality to start
a WebDAV explorer on a Windows computer from within a WebPage:
<HTML>
<HEAD>
<SCRIPT>
function fnDavStart(oSpanObj, sPath) {
oSpanObj.navigateFrame(sPath, "_blank");
}
</SCRIPT>
</HEAD>
<body>
<div ID=davDiv>
<SPAN ID=oWebDavHelper style="behavior:url('#default#httpFolder');" onclick = "fnDavStart this, 'https://webdav.myserver.com')">
Click here for WebDAV folder
</SPAN>
</div>
Now the method navigateFrame() and/or the behaviour "httpFolder" seems to be gone in IE11.
How to get similar functionality in IE11?
Thanks,
You can force IE to render like IE9 with this code in your meta tag:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9">
It will make all IE versions (even the ones not yet released) to render pages and javascrit like IE9.
I havent used the behaviour approach before, but have you checked if the SharePoint OpenDocuments object still works?
Open Now
Here's some code with the js embedded in java.
https://github.com/miltonio/milton2/blob/master/milton-server-ce/src/main/java/io/milton/http/fs/FsDirectoryResource.java
I know this is an old question but before you dismiss it, just here me out.
I am developing a site and everything (including javascript) works perfect in Firefox 24.0 and Chromium 28.0. I have not tested in IE coz am on an Ubuntu 13.04 machine. I tested in Opera 12.16 and suddenly my javascript doesn't work.
Javascript is checked in opera preferences and all my external jquery and javascript scripts have the type="text/javascript" part. Still no good. I have commented out all my external script files including jquery and then added a
<script type="text/javascript"> alert('JS working'); </script>
in the head. Still no good. Alert working in Firefox and Chrome but not in Opera.
I have checked these questions out, still no good:
javascript not working in OPERA
Javascript does not work in Opera - strange
I don't know what's going on with Opera and its really confusing.
Any help appreciated.
Update:
There are no javascript errors in the dragonfly error console.
Sounds like JS is disabled in Opera. Pless and select Enable Javascript.
I am having a strange problem in Google Chrome. I am including a js file via script src tag. I place alert('test') in the file and when I load the page in Chrome, It alerts twice. In every other browser it alerts once. Is there any known cause for this?
Here is the code that loads the JS:
<script type="text/javascript" src="/js/main.js"></script>
It appears this happens in Safari as well. Does not occur in IE and firefox.
I had this recently and eventually found out it was a chrome extension, specifically the cache killer extension
This might be helpful
Webkit browsers (Chrome, Safari) are loading pages redirected from .htaccess twice!
I've noticed this same problem in Chrome. I have some code that runs when the page loads and I have an alert inside that code. In every browser other than Chrome this code is run once, thus the alert displays once. In chrome the alert shows twice. I am not doing anything special, just running code when the onload event is triggered within <body onload="somefunction()">. I am not using links, iframes, or the Cache Killer extension. I tested it in Safari and the code is only being called once. This seems to be a Chrome specific problem.
I did some research and it appears this is a bug with Chrome. I found this link https://code.google.com/p/chromium/issues/detail?id=64810
Depending on your specific situation, this page may give you a work around for the problem.
The problem does not seem to be fixed as of yet.
I put up this test page to illustrate this issue: (dead Link)
Every browser I've tested on has worked but in Internet Explorer 8. The odd part is that Internet Explorer 8 doesn't even report an error, WOW, and that is something. So right now I'm stuck with to nothing to work on or debug. What have I overlooked?
So somehow the xmlns attribute that I had previously set to the HTML tag was gone, probably me undoing things like crazy.
Here is how it should be if anyone encounters this issue:
<html xmlns:fb="http://www.facebook.com/2008/fbml">
<html xmlns:fb="http://ogp.me/ns/fb#">
<head></head>
<body>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1">
</script>
<fb:like href="http://www.facebook.com" send="false" layout="button_count" width="500" show_faces="true"></fb:like>
</body>
</html>
Even this is not working in the IE. It is opening a pop up url=http://www.facebook.com/connect/connect_to_external_page_reload.html and that's that. On Debugging I see it is not picking up the xmlns. Same code works fine in FF and Chrome and I am able to see on my facebook wall also but not if I do through IE.