HI ,
u can catch the esc event like

<script>
   function keyPressHandler(e) {
      var kC  = (window.event) ?    // MSIE or Firefox?
                 event.keyCode : e.keyCode;
      var Esc = (window.event) ?
                27 : e.DOM_VK_ESCAPE // MSIE : Firefox
      if(kC==Esc){
      GB_close();//call the gb window close function.
      }

   }
   </script>


<body onkeypress="keyPressHandler(e)">


Samuel Goldwyn  - "I don't think anyone should write their autobiography
until after they're dead."

On Tue, Mar 31, 2009 at 8:06 PM, Logos <[email protected]> wrote:

>
> You're probably gonna have to post that to lang.javascript - while you
> can assign a key listener to lots of objects, I'm not sure how to get
> it to listen globally without assigning every focusable element the a
> keylistener.  If you find out, post back here - I'd like to know!
> --
> Tyler Style
> http://malthusian-solutions.com
> http://nirdvana.com
>
> Ksaniya wrote:
> > Hi Guys,
> >
> > Please help me to sort out how to close Greybox by pressing Esc.
> > Unfortunately I'm a beginner in javascript, but I'm trying to study.
> >
> > Thanks a lot!
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GreyBox" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/greybox?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to