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.

General Questions /

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

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

Does window.close() work in SilverStripe


Reply


3 Posts   444 Views

Avatar
novaweb

Community Member, 115 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, 115 Posts

19 June 2012 at 6:26pm

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