I am opening pop up windows from a website (flash content) the following way:
RING = window.open(path,'RING_Projekt','width=800,height=600,scrollbars=no,top=' + t + ',left=' + l +'');
The HTML file opened in the popup is valid HTML with a <title>, yet Chrome (all other browsers do work fine) will display "Untitled" in the title bar.
Does anyone know why this is happening and if there is an error / workaround that could fix this? Or is this some kind of a pop up blocker malfunction / bug?
Thanks!
EDIT: Playing around, I noticed the following (unfortunately it ADDS to my confusion...): the page with the flash content opens another popup (displaying news) on load by doing:
var NEWS = window.open('popup/news.htm','RING_news','width=400,height=400,scrollbars=no,top=20, left=20');
When I now open a popup with the function mentioned in the above post, then go and close the news-Popup opened on load and then switch back to the "on-click"-Popup the popup magically acquired a name. When you close this and open it again, the name is gone again.
To be honest: I don't get it. I should be able to have more than one pop-up, right? Also, I cannot see any naming problems or anything else that could explain this behavior.
Am I missing something big here? Or is this a plain bug?
Ok, I am a 99.99% sure this is a Chrome bug, so I'll answer this myself.
Chrome seems to read the specified title correctly from the HTML (as it will be displayed in the task bar), but seems to have problems when having to display the name in the bar on the popup (see screenshot below). When you start to fiddle with the popup (move / resize), the title will sometimes appear and disappear again. Yet, the names in the task bar will always be right (that plus the fact that it works in every other browser lets me think it is a bug).
I am running Chrome 14.0.835.186 m on Windows Vista.
http://code.google.com/p/chromium/issues/detail?id=113201
its a open bug
This is a bug with Chrome. However, there is a workaround for this.
If you put the following script in the page that opens in the popup window, it seems to work fine.
<script language"text/javascript">this.window.resizeBy(1,1);this.window.resizeBy(-1,-1);</script>
The second argument to window.open isn't the <title> of the new window, used by <a target="...">, for example.. The title is determined by the content of the page.
See MDN docs for more info.
Related
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>
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.
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()
Have looked at the answers to previous questions and am not sure if it
is the same issue as I am having. Some of the possible answers I have found
on the net are aged so am not sure whether anything has changed regards this.
I have this code to check for a cookie and then either open one or two
tabs dependent on whether a cookie is found.
On the html side I have a link like this:
<a target='_blank' onclick="newTab()" href="http://www.test.com">
In the head section the newTab() function does the cookie check then
if needed opens a window like this:
window.open('http://www.test.com/members/','_blank');
When the link is clicked the above works fine in Firefox and IE and both
windows open when needed but in Chrome only the onclick tab opens and not
the main url regardless of the cookie.
I imagine this is an issue relating to opening tabs/windows in Chrome but
I thought that the above would be dealt with by Chrome as the opening windows
are the result of a user click.
Am I missing something simple or is it a restriction on Chrome?
Thanks for any advice.
Indeed as answered by CBroe the reason for the problems was because
I had used _blank as the window name for both.
I changed one over to _parent and it is at least working like this now
so thanks for the assistance.
I have latest google chrome version -32.0.1700.107 m installed on windows 8 machine.
I am doing this:
popup = window.open();
popup.print();
This opens a new popup and a print window appears. Now, when I go back to the page from where I triggered this, it freezes and I cannot do anything there.
Here is the small fiddle for your reference. FIDDLE
Click the button and come back to the fiddle page (do not close the print page) and try typing anything in the fiddle, it will be hanged and as soon as you will close the print page, the fiddle window will get normal.
This is in Google chrome ONLY, other browsers are working smoothly. Please help.
I tried:
Opening the popup in new window using window.open("","","width=800,height=600").
Putting popup.close().
opening it on some different OS (windows 7, XP)
But got no success
Please some kind soul help me with this issue or some work around.
This is an issue in Google Chrome and will be fixed in Chrome 36 according to this issue.
I'm a Chrome user and would be lost without Firebug, but one issue has always annoyed me. Namely, the fact that the Firebug console doesn't appear below the site you're viewing (ie the way it behaves in Firefox). Instead, the console sits above the site, obscuring the footer and content. It's a little thing but annoying all the same.
I understand that this is because of the way Google restricts Chrome extensions but is there a way around this particular issue?
I haven't found a solution anywhere. So, with some help from other stack overflow threads, I came up with a very simple function and as I couldn't find much about this, I thought I'd post it here for anyone with the issue.
I'm not a JavaScript programmer, but I do use jQuery. As such, I run this inside jQuery's ready method. Once the site has loaded, it'll check to see if Fire bug is open, if so, it simply adds a 400px bottom margin to the body. Obviously, if your console is bigger/small than that, just change the size inside the jQuery code.
It won't however change anything if you open the site and then open Firebug. It's nothing major, just open Firebug then refresh the page an it'll work.
// add body margin if firebug is open
if (console.log.toString().indexOf('apply') != -1 && navigator.userAgent.toLowerCase().indexOf('chrome') > -1) {
$('body').css('margin-bottom', '400px');
}
Hopefully this will be of use to somebody.
EDIT:
WARNING: This can possibly cause your jQuery to stop working in Internet Explorer. So, just remove this if you find that your jQuery doesn't work.
Instead of modifying your webpage's CSS code which may have adverse effects, you should just detach Firebug Lite in Chrome, then position that popup window under the resized Chrome browser window.
To perform this, just press the center button in the Firebug Lite window located at the top right corner.
Right-click the image below and view in full size if that helps:
Open Image in New Tab / View Image
This way, you'll have two separate areas that don't overlap yet play nicely together.
Per Stan's comment above... about what does Firebug Lite provide extra when compared to native Chrome's Developer Tools, I would have to say it provides familiarity and a great DOM Tab that Chrome lacks.
More importantly thought, you can actually use BOTH consoles at the same time.
This allows easier monitoring of two different panes and with a multi-monitor setup this can be a useful scenario. Even with a large monitor things look good.
Right-click the image below and view in full size if that helps:
Open Image in New Tab / View Image
I have the following JavaScript code to pop up a window in Internet Explorer. The code is executed from a page within a Microsoft CRM modal dialog box. (RequestID is a string that is always the same in the test system - at the moment it contains "abcdefg" - without the quotes).
var cancelUrl = "CancelRequest.aspx?RequestID=" + RequestID;
alert("About to open a window.\n\n" + cancelUrl);
window.open(cancelUrl);
alert("Window opened");
I expect to see a message telling me that I am about to open a window. I then expect to see a window open and get another message about the window having been opened. I don't really care about the order of the last two events; the alerts are there so I know the code has been executed.
I have two PCs and a virtual PC. All running IE7. On the Windows 2003 VPC, the messages and pop-up appear every time without fail.
On the Vista PC and WinXP PC, the messages appear but the pop-up only appears intermittently. (I think this may be the case on the Vista PC too).
All three have identical settings in IE. All have the IE pop-up blocker disabled and have no other pop-up blockers installed.
Can anyone shed any light on this?
Ah, I think I got it... missed it in the description...
You are trying to open a non-modal window from a modal dialog in IE.
This AFAIK, should not work.
Try opening another modal window instead.
Effectively you are saying...
on window A, open up modal window B, now open up non-modal window C, which isn't really valid.
This code is simple. Use debugger and see what is going on.
Check that site with FireFox or Chrome, they have JS debuggers.
Edit:
Add try/catch block around window.open() and see if there is some exception there.
Edit 2:
I see now that you are sending characters as RequestId. You should check if that URL can handle that kind of value. Since name is RequestId I'd say that there is big chance that there should be numeric only parameter. If that is correct, then it can happen that server side crashes when you try to open window and then nothing happens. Reason more to set try/catch block and test.
You might want to try Firebug lite, which will work for IE.
http://getfirebug.com/lite.html
The try/catch other people have mentioned is also a good idea. I think.
Additionally, is there any chance that the pop-up is trying to use a window that is already open but minimized. So it doesn't appear to be working but it's really just reloading the minimized window?