I am using GreyBox for opening a new HTML page in the same window. It's working fine but now I want that it should get closed on pressing escape or if a user clicks somewhere else on the page. How can I do that?
edit:---
document.onkeypress = function (event) {
if (event == undefined) { event = window.event; }
if (event.keyCode == 27) {
AJS.AEV(document,"keypress",GB_hide);
}
}
i used this and it runs fine on mozilla but not on safari or chrome.... any idea why is thats so??