PDA

View Full Version : Using A Button to Close a Browser


youngloopy
09-23-2005, 01:48 PM
Is there a way to make a button onClick close the current browser? I need it because I have a contact page that opens in a new smaller browser and I want the 'thank you for contacting us' page to have a button that closes the new small browser

_Aerospace_Eng_
09-23-2005, 02:06 PM
If the button will be on the 'thank you for contacting us' page then you can use
<input type="button" onclick="window.close()" value="Close Window">
Note this will only work if the new smaller window was opened using window.open.

youngloopy
09-23-2005, 02:41 PM
This is how I have it opening

<a href="#contact.htm" onClick="MM_openBrWindow('contact.htm','','toolbar=yes,location=yes,status=yes,menubar=yes,width=700,height=6 00')"

I don't really know another way, if you have any suggestions That would be great, I don't know how to use window.open but I can if you have some code or something.

Thanks,
Josh