Hi, You open it with modal.show(target), right ? Since you have the 'target' you can use it to execute an arbitrary JavaScript after opening the modal: target.append(someJsToFocus).
The JS should look like: "document.getElementById(" +modal.getMarkupId()+ ").focus();" On Mon, Aug 20, 2012 at 11:44 AM, Marco Di Sabatino Di Diodoro <marco.disabat...@tirasa.net> wrote: > Hi all, > > I want to set the focus to a ModalWindow when it is opened. This allows me to > close the ModalWIndow with the esc key without having to click on it before. > > suggestions? > > Thanks > M > > -- > > Dott. Marco Di Sabatino Di Diodoro > Tel. +39 3939065570 > > Tirasa S.r.l. > Viale D'Annunzio 267 - 65127 Pescara > Tel +39 0859116307 / FAX +39 0859111173 > http://www.tirasa.net > > Apache Syncope PPMC Member > http://people.apache.org/~mdisabatino > > > > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org