1
votes

When i open a new window using window.open javascript, chrome opens with about:blank, but firefox opens with jsfiddle back url and if you right click on the page, you can still see the page loading. You will not see the refresh icon, instead a stop icon is appearing.

I need to open the new window with about:blank.

Here is the jsFIDDLE

Tested with Chrome 45.0 Tested with Firefox 41.1

<button id="helper">Click here for help</button>
2
No..it didnt work. _blank is for fullscreen right - Alaksandar Jesus Gene
Sorry, misread your question - Rudie Visser
jsFiddle doesn't allow document.write - Axel Amthor
After openedDocument.write(myHTML) you should close the document with openedDocument.close(). - Oriol
Mr.Oriol, it solved half of my problem. Thanks.Can you post this as a answer. - Alaksandar Jesus Gene

2 Answers

2
votes

What you are experiencing is a new Firefox behavior that passed in version 40 or 41 (sorry I did not find the reference).

Expect it to become part of google's behavior soon too, you can see people requesting it already(Chrome issue)

Unfortunately there is not much that can be done for now as it is brand new people have not found workaround or even if it is a good idea to fight against the browser... My suggestion is to not use about:blank at all and use a blank html page from your domain, that would make things easier on the users.

0
votes

Instead of about:blank take #:

 $("#helper").click(function(){
                  windowURL = window.open("#","Looking ....

EDIT

in order to prevent the browser from showing an "infinite loading", close the document:

...
openedDocument.open();
openedDocument.write(myHTML)
openedDocument.close()