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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pop-up to close browser & self

Status
Not open for further replies.

StephanieCC

Technical User
Aug 28, 2001
48
US
I've created a pop-up with yes/no buttons that should close itself when yes is clicked, leaving the homepage on the screen--that works--what I'd like is for the no button to close the pop-up and the browser--on the pop-up, for NO I am using onclick window.close (I've also tried browser.close) and on the homepage which is where the pop-up script is, I have set the pop-up window to dependent--I thought dependent and close window worked together to do what I'd like but . . .

 
You can do this:

function....{
...
window.opener.close();
self.close();
...}

WARNING!!! Unless you opened the window that it closes yourself, it will bring up a prompt box instead of just closing. It will only close automatically if you had them open the window by clicking on a link or by using a javascript function.

Rick

Does this happen to be the same page where you won't let them use the browser without agreeing to something by clicking "yes"? It seemed like it was you who asked that question before. If so, this method will not work for the reasons previously stated. if(($question=="has been bugging me"
AND $answer=="fixed the problem") OR $answer=="really good post"){
print("Star");
}else{
print("Thanks.");
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top