window.open

Document.links empty after calling document.close

When you execute following example using Firefox 3: <html> <head> <script language="javascript" type="text/javascript"> <!-- function openWindow(){ var w = window.open('', 'otherWin', 'width=600,height=600'); w.document.write(document.getElementsByTagName("html")[0].innerHTML); w.document.close(); reportLinks(w....

Why is window.open() loading the URL in the same window?

I read a book about javascript and it says that when we create a function for opening a new window, the reference to the new window object is stored inside the variable assigned to the window.open(theURL , newWindow) call. It also says that if the same variable is used for two or more URLs, no matter which URL I click it would be open in...

window.open not working in IE

Apparently, this call to window.open is not valid under Internet Explorer. The Javascript code on my site is not running, I would assume it is due to that error. The line it tells me the error is on, is the call to window.open, apparently an argument is not valid there. $('.objeto').click( function() { var center ...

Html javascript to open new window and close current window

I have a popup window and in the page i have one the follow code in the body. The purpose is to have this popup windows close when user click on the image link, and a new page will be opened and directed to "http://www.somesite.com". it works with IE and Chrome, however, in Firefox, the popup window is closed but no new windows is opene...

How can window.closed = true, when the window is open?

Hi all, I am stepping through code, and I realized I cannot close a window, because the DispHTMLWindow2 object close property is still to true. if(winObject.closed != true) winObject.close(); The problem is winObject.closed == true, and the window is clearly open. Any ideas where I can look to figure this out? Thanks,...

How to know when popup is closed in javascript

This code will open go.com in popup window: <a href="javascript:void(0)" onClick="javascript:window.open('http://go.com','','status=yes,scrollbars=yes,toolbar=no,menubar=no,location=no ,width=300px,height=300px')">open</a> and I want to use alert('closed!') in main page, when popup is closed and I can't edit popup page for use onunlo...

window.open object change parent element?

I'm not the most javascript savy. I've seen posts for children windows getting parent values but not vice versa. Basically, I want to invoke a window object with window.open. After some user input is entered in the new window, I want to stuff that input into the original window that invoked the window.open. The only ways I can think to...

Why does twitter bookmarklet does not get blocked by popup blocker?

Check this link. http://dev.twitter.com/pages/share_bookmarklet Drag bookmarklet to your bookmark-bar and click on it. It will open a pop up window. Why is my firefox/ie/chrome not blocking this? Thanks javascript: function loadScript(scriptURL) { var scriptElem = document.createElement('SCRIPT'); scriptElem.setAttribute('la...