I set the event to Key Release, using the 'document' DOM object.
The JavaScript condition is set to 'event.which = 27' - the ASCII translation of the escape key.
Finally, the true action closes the window, passing nothing back to the calling page
javascript:window.parent.$(window.parent.document).apex_modal_page('close','');>
Of course, aside from the action - the same event can be captured if you're listening for the escape key for whatever reason.
Hope it helps.
Hi Scott,
ReplyDeleteVery nice. I'll consider adding this as a declarative option in the future.
Regards,
Dan
Cool - and thanks again for a very useful plug-in!
ReplyDelete