Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Does window.close() work in SilverStripe


Go to End


3 Posts   641 Views

Avatar
novaweb

Community Member, 116 Posts

19 June 2012 at 4:09pm

Hey Stripers,

Just trying to close a window using jQuery.

This won't work for me: http://pastie.org/4112364

Nor will <a href="JavaScript:window.close()">Close</a>

Lost! Ideas? Cheers. Ears.

Avatar
Bambii7

Community Member, 254 Posts

19 June 2012 at 6:13pm

Edited: 19/06/2012 6:15pm

I think this only works with modal windows

popup_window = window.open("");
popup_window.close ();

Heres a better example http://www.javascript-coder.com/files/window-popup/javascript-window-close-example1.html

Avatar
novaweb

Community Member, 116 Posts

19 June 2012 at 6:26pm

This has been solved. Will post resolution when back on work computer tomorrow.