• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Overlay onClose

Chris D

XenForo developer
Staff member
#2
A very cheap way of doing it...

Add this to the overlay template:
HTML:
<a href="{xen:link 'link/to/page'}" class="button OverlayCloser">{xen:phrase close}</a>
 

Valhalla

Well-known member
#3
A very cheap way of doing it...

Add this to the overlay template:
HTML:
<a href="{xen:link 'link/to/page'}" class="button OverlayCloser">{xen:phrase close}</a>
Thanks. I'd considered that, but I didn't think (?) it would work if I close the overlay if I simply 'escaped' out.
 

Chris D

XenForo developer
Staff member
#4
Yes, that is the gotcha, I think.

A more advanced way is doing it is with Javascript. There is an event triggered called onBeforeClose. Bind a function to that event and that should cover all eventualities.