Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Window self.close problem 1

Status
Not open for further replies.

IBZ

Technical User
Joined
Mar 21, 2006
Messages
2
Location
GB
I am new to javascript, I have a problem with a window...

I am using this code to open a new window when someone clicks on the link, but I would like to close the parent window when they have clicked...

Code:
<a href="javascript:void(null)" onClick="makeNewWindow0091();javascript:self.close()">Link</a>

The new window is opened when the user has clicked on the link but a popup box appears and asks the user if they really want to close the window.
How can I stop the popup box and close the window automatically?

Am I doing this wrong?
 
Hi,
In your makeNewWindow0091 function ( not where you have it now) use something like this:
Code:
 windowprops = "fullscreen=no,location=no,scrollbars=no,menubars=no,toolbars=no,resizable=yes"; //modify to fit your needs
NewWindow=window.open(<yourdesiredwindowurl>,"rptWindow",windowprops);
self.close()





[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Thank you Dan, my window now closes without the popup! Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top