Hi

<element onkeydown="if(event.keyCode == 27 ) doSomething()"....

<body onkeydown="if(event.keyCode == 27 )
document.forms['FORMNAME'].CANCELBTN.click()"

More info
[url]http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/objects/obj_event.asp[/url]

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"Paul" <qwe@qwe.com> wrote in message
news:08be01c34ac2$baeb75d0$a601280a@phx.gbl...
> Hi
>
> Whats the easiest way to get a 'Cancel' button that
> responds to the ESC key and responds to an event, just
> like in Windows apps (clientside)? Do I need to hook up
> an onkeypress event on the form or is ther an easier way?
>
> Thanks, Paul.