Hey Everyone,
I'm having some difficulties with *ModalWindow*. I need a way to set the
HTML Focus to the title of the *ModalWindow *when it pops up, but so far
nothing has worked for me.
1. I have tried adding an *AjaxEventBehavior ("onload")* to my modal window,
but that did not work. Neither did *("onchange")* or *("onblur")*.
2. I have also tried appending javascript to the target when invoking the
ModalWindow's *show()* method:
...but unfortunately this.getMarkupId() is referring to the div holding the
wicket component:
...and not the actual Modal Window itself, which is dynamically creating
id's like so:
3. I have also tried using *AjaxRequestTarget.focusComponent()*:
...where *child()* is simply returning the first component in the hierarchy
that is not a WebMarkupContainer:
Using the Wicket Ajax Debug window, we can see that my 3rd attempt did
successfully fire some javascript to set focus:
BUT when I use the Internet Explorer developer tools and run
*document.activeElement*, I am returned the entire body of the web page,
meaning there is no focus set.
If anyone can think of a way to set focus on the modal window title, or a
way to hardcode id's for different parts of the modal window, please help me
out. Thanks!
--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]