• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

window.opener='x'

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I saw some code looks like

window.opener='x';

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

thanks.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic