I am on the parent page from which I use javascript in jsp, to open a popup and I used the method window.open("url","windowName"," width,height,locastionx, locationy") to get a popup. Everything works fine in all browsers(like Mozilla, Chrome etc) except that the Popup doesn't show the url or address bar in Internet Explorer 10.
I am attaching the screenshots for reference
The following screenshot is a popup from IE
The following is a screenshot of popup from Mozilla
Is there a way in which the window.open method which will show address bar in the IE?
Thanks for helping
I did read in few online blogs that the behaviour of the popup is different with the IE7 or above than in the Mozilla or the Chrome browsers.
I've been busting my head around this problem a couple of days, I've browsed a lot of sites to find the answer, finally I discovered that IE when you run your code in a local environment it hides the URL bar, but when I run it in a Test/Prod server the address is shown (not showing the URL address is clearly a security flaw), this just happens only in IE, which is annoying, for FireFox and Chrome work as intended, and it's kind of a headache if you need to test because it may seem like an error or bug.
Here are the links that should make the things clearer:
Complete cross-browser window.open() documentation -> here
MSDN open method notes ->
here
Server Fault question about IE trust policies related to the URL bar -> here
Related
I have tried pretty much every which way to configure the Google Invisible reCAPTCHA widget, but there is always an issue with the latest Firefox browser, detailed as follows:
add the plugin to a web page, which has other JS such as a dropdown menu
load the web page
keep loading the web page over and over, in an attempt to catch it 'half loaded'
eventually you will see for a split second an alert "The page at https://www.google.com says: Cannot contact reCAPTCHA. Check your connection and try again"
from now on, JavaScript is entirely broken until you restart the Firefox window
This never happens in Chrome, and appears to be Firefox only. I am surprised to not find any reports of this major issue with vendors Google and Firefox (unsure which party is to blame), so created this ticket.
This issue can be replicated on the official Google Invisible reCAPTCHA Demo by quickly reloading the page. This will eventually show the alert and break the entire demo, making all form inputs unresponsive until the Firefox window is closed and re-opened.
At the time of writing, I am using OSX Firefox 57.0.1 (64-bit) to replicate this issue, but has also been replicated on the same Firefox under Windows 10.
Update after valid comment from Federico, as this is being reported a lot but no solutions or workarounds that I can find: Google Groups Search
Is this a known issue and are there any plans to resolve from either Firefox or Google, or more importantly has anybody managed to put a workaround in place in the meantime?
I think the issue is resolved now. Try again and it is giving successful verification. I guess it was a bug which they fixed. If the problem still persists please try upgrading Firefox to the latest version.
I'm writing a bit of code to display an EU Cookie notification.
If the visitor does not accept the use of cookies, I want to take them somewhere else. My first thought was to take them to the browser's home page.
I found a way to do it in IE - I have been told that the method on that page is for IE 10 or less.
I have not found a way to do so in other browsers.
If this turns out to be more trouble than it is worth, I'll take them somewhere via a specific URL, such as www.google.com
Does anyone know of the method to accomplish the same thing in browsers such as Firefox, Safari, Chrome, etc?
Most browsers implement an address that will point to the home page. You should be able to redirect the user to the proper location after you figure out their browser.
For Chrome you can link them to about:newtab, which may be different from the home page, but it is probably the closest you will find. The actual homepage button is not implemented in Javascript and does not use a URL.
For Firefox you can link to about:home.
For Opera you can link to opera:speeddial. (I did not test this one, if someone wants to I'll update)
The documentation you linked to claims to be obsolete after IE10. I think you can link to about:home on IE same as Firefox if your solution isn't working afer IE10. (I did not test this one, if someone wants to I'll update).
Okay, here's my problem. I wrote some JavaScript for a page, for some reason the page doesn't work in Chrome. The site does what I expect in Opera, Chromium and Firefox. In the Choom devtools there is a kind of error showing in the source tab showing "JavScript is disabled" in a mouse hover popup:
I turned off all chrome's extensions, Javascript in on in the content settings and I cleared all JavaScript exceptions I had, but this didn't seem to change anything. The weird thing (an other one) is that some other sites give the same alert icon in the devtools (including this one) but JavaScript works just fine.
If you perform the exact same functions in the console then, some of, the functions perform just fine.
Does anyone have an idea what I could be because I am out of idea's and it is really annoying that I have to switch browser to test the page (page is 'live' here). Thanks
Have you checked the DevTools settings? You might have accidentally enabled "Disable Javascript"
long time lurker, first time poster.
The basics are this:
Inspired by this blog post, I'm attempting to create a bookmarklet for our QA team to quickly populate a form.
The bookmarklet works perfectly on my machine (TM) in Chrome, IE 10, and IE 9 compatibility mode. I've tested the bookmarklet on the QA team's machines, and while it works fine on their Chrome browsers and on IE 9, the bookmarklet doesn't work on the two machines running IE 11.
Details:
Of the two machines running IE 11, one is on Win 7, the other is on Win 8.1. The machine running IE 11 on Win 7 is updated to IE version 11.0.9600.17207IS, and will also run the bookmarklet correctly in Chrome.
I've attempted a couple different variations, the first based on the CSS-Tricks blog post mentioned above.
<a href="javascript:
(function(d) {
var body = d.getElementsByTagName('body').item(0);
var script = d.createElement('script');
script.src = 'https://company.siteurl.com/unrelated/DisclosureRegister.js';
body.appendChild(script);
}(window.document));
alert('Bookmarklet js fired!');">Disclosure Register Bookmarklet</a>
The second, based on a StackOverflow Response, is as follows:
<a href="javascript:
(function(){
var s=document.createElement('script');
s.type='text/javascript';
s.src='https://company.siteurl.com/unrelated/DisclosureRegister.js';
document.getElementsByTagName('head')[0].appendChild(s);
}());">Disclosure Register 2</a>
Both codes work on my machine in the previously mentioned browsers, neither work in IE 11 on the other machines (I don't have IE 11, can't test it directly on my machine).
I get no error message in console in the developer tools, and the DisclosureRegister.js file isn't listed in the developer tools' file list. It appears that the bookmarklet simply isn't firing.
Neither one of those bookmarklets have a Web Documents tab when I right click > properties, however, a simple javascript alert bookmarklet I provided them with does have the Web Documents tab, and it works perfectly in all browsers (including IE 11).
Click me!
I'm delivering the bookmarklets by writing the html in Codepen, emailing them a direct link to the Codepen (I don't have enough reputation points to post the link), and having them drag the link from the Codepen output to their browser favorites bar.
I came across something that gave me hope it was a bug with an older version of IE 11, but the IE version being used is even newer than the version that fixed the related bug.
Just in case there's something in the DisclosureRegister.js file that's causing IE 11 to abort the javascript, I'm including the code for that as well:
(function (win, doc, $, undefined) {
//Don't run if jQuery isn't loaded
if (typeof window.jQuery === 'undefined') {
return;
}
alert("Script is being called!");
}(window, window.document, window.jQuery));
The question:
While I'm certainly not ruling out an error with my code (and of course, please correct me if it's wrong), is there anything peculiar with IE 11 in the way it handles javascript bookmarklets that I need to account for in the code?
Thanks in advance for your time!
I wrote that article. Really glad you guys are finding it useful.
It seems there a bunch of people complaining about bookmarklets not working properly in IE11. One thing I'd test is how IE11 handles same origin policy. Check out this link, and see if you can temporarily disable same origin policy. Then test.
Obviously it won't solve the problem, but it could lead you in the right direction.
Hope that helps a bit. Let me know.
I think I found what is the problem with bookmarklets in IE11. I just added a bookmarklet in IE11 and it wasn't working so I started googling and found this page. Then I found bookmarklets at Microsoft's own website where they actually recommend to use it and it works. Then I decided to check if the syntax is correct and this where I found a problem. For some reason IE cuts part of long bookmarklets when it adds it to the toolbar by draggin-dropping. My bookmarklet that I was tried to add was several brackets short of original and because of that the syntax was incorrect. I then copy-pasted full code manually and it started working.
I was able to resolve the same problem by removing all line breaks from the bookmarklet code. IE 11 apparently doesn't know how to handle them.
With line breaks in the bookmarklet code, after adding it to "Favorites" the properties showed a blank URL and nothing would happen when clicking it.
With the linebreaks removed (ran a regex to collapse all whitespace to a single space character), after adding it to the "Favorites" the properties show the correct javascript in the URL field and it runs correctly when clicked.
I wasn't able to find anything anywhere documenting this limitation.
I really need your help. I am working on a pop up window
using JavaScript.
I am using the window.open(URL,name, properties);
I wanted to load a window that does not load the URL window.
I tried the location=0 and location=no setting, it seems to work
fin on Firefox but alas it is not working on IE!
In Firefox, it is not showing the location bar anymore, but in IE
the location bar is still there with the URL!
Please help. :9
tinks~
You seem to be calling the method correctly, IE most likely doesnt allow you to hide its url bar. Most browsers have user-defined preferences whether they want to allow websites to be able to hide toolbars. Popups are very susceptible to security options.
I'm afraid you'd have to live with it, if the user doesnt want you to hide the url it wont.
Not possible anymore as all modern browsers do not allow you to hide the URL in Popups anymore :)