# Close pop up window



## riversedge21 (Mar 23, 2004)

Is there a way to close a pop up window without having a dialog box pop
up saying "The webpage you are viewing is trying to close the window.
Do you want to close this window?
Yes No

I have a custom pop up with an ok button and want the window to close 
when they click it.

Currently I am trying to achieve this by putting javascript:window.close()
in the properties link box of the button using dreamweaver MX but I get the above mentioned pop up after click.

Any help would be much appreciated.

Thanks,

Sean


----------



## riversedge21 (Mar 23, 2004)

If I don't give the pop up window a name the 

"The webpage you are viewing is trying to close the window.
Do you want to close this window?
Yes No
popup window does not pop up.


----------



## Shadow2531 (Apr 30, 2001)

You an also do something like this

close window


----------



## DrewGBowman (Jun 23, 2004)

You can open a modal dialog (IE only, but I made a script that will degrade by opening a popup for other browsers http://drewsdesigns.8k.com/CB.modal.htm ). The only problem with using this though is there is a seprate close command for modal windows (which I dont quite remember from my researching) so your close button will need a "if not" statement for IE to do window.close().

This will still give you a warning for other browsers than IE, but most people use IE.


----------

