onenter event


we use various layouts and have created a custom alert box using a dhtmlx window, which also contains a toolbar that contains button that closes the alert box, and a grid that displays various information in it

we would like to add the functionality where the user can hit enter on the keyboard and it is attached to the close button on the toolbar. so when they hit enter on the keyboard it closes the alert box window

can we do this with any functionality in your components?



You can try to use the following approach to close window on any action:


Here w is window object.

thanks for your reply…  how do we attach the window.close() function to occur when a window is open and they click enter.

where do i put the code that listens for the enter to be pressed when a window is open?


do you have any ideas on this please?


The dhtmlxWindows component doesn’t provide onkeypress event handler.

So, you should use own approach to attach “on enter press” event handler to the necessary object.