Jump to:

5450 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Intercepting popup (GreyBox) close events?

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

Page: 1
Go to End
Author Topic: 616 Views
  • HansR
    Avatar
    Community Member
    140 Posts

    Intercepting popup (GreyBox) close events? Link to this post

    Does anyone know of a method of intercepting the popup close event and cancelling it if need be?

    I'd like to run a "has the form been modified" type check when the user clicks on the popup window's close button. Basically, I'd like to warn the user if he/she might be about to lose some work. Is this possible with the GreyBox javascript module? I've tried simply binding a handler to the GB_close element, which doesn't work. That's not too surprising, as GreyBox.jx has installed its own handler. I haven't found any mention of a hook that could be used in the GreyBox documentation, but am hoping that there still is a method of doing this.

    Hans

    616 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.