This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

window.opener='x'

 
Steve Mutonshi
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I saw some code looks like

window.opener='x';

what does this mean ? what is this 'x' ?

thanks.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
'x' is a string
window.opener is normally the reference to the window that opens up a pop up window.

People used to run code sort of like that to trick the browser into letting the parent get closed. I could not tell you if that is the case here without seeing all of the code in that section.

Eric
 
Steve Mutonshi
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Eric Pascarello:
'x' is a string
window.opener is normally the reference to the window that opens up a pop up window.

People used to run code sort of like that to trick the browser into letting the parent get closed. I could not tell you if that is the case here without seeing all of the code in that section.

Eric


Eric, you are right. I saw the following sample code for closing the window

window.opener='x';window.close();

Since I am not familiar with Javascript, I don't know if I can "copy" the same code without changing the syntax 'x' ? what I want to do is to close the window without getting a pop up warning msg.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic