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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   709 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.