Re: Settings focus to window opened by javascript appended to AjaxLink

2008-02-20 Thread jeredm
I am having a similar problem in IE, but it does not happen in Firefox. I am popping up a modal dialog and want to set focus on the first text box in the modal when it is opened (id=focusMe). Here is some code that has been trimmed for simplicity: HTML: input id=focusMe type=text

Re: Settings focus to window opened by javascript appended to AjaxLink

2008-02-20 Thread Christian Alejandro Marquez Grabia
You should try without the alertit removes the focus when you click the 'Ok' button. Instead you should try something like: onfocus= this.value = 'focused'; Another method that can be used is select() instead of focus() Rgds, Christian On 2/20/08, jeredm [EMAIL PROTECTED] wrote: I am

Re: Settings focus to window opened by javascript appended to AjaxLink

2008-02-08 Thread Grzel
Thanks, I tried this already. It minimizes the window though. Is there any way to keep window displayed at the back, but allow popup (javascript generated) window to be displayed at front? I tried different javascript options with protected IAjaxCallDecorator getAjaxCallDecorator() { return new

Re: Settings focus to window opened by javascript appended to AjaxLink

2008-02-08 Thread Igor Vaynberg
dont know, i think calling focus() on the window should work as long as it is the last focus call that happens, not sure why it doesnt for you -igor On Feb 8, 2008 6:50 AM, Grzel [EMAIL PROTECTED] wrote: Thanks, I tried this already. It minimizes the window though. Is there any way to keep

Re: Settings focus to window opened by javascript appended to AjaxLink

2008-02-07 Thread Igor Vaynberg
also try calling target.focuscomponent(null). by default target will try to refocus the component that cause the ajax request. -igor On Feb 7, 2008 7:57 AM, Grzel [EMAIL PROTECTED] wrote: Hello, I am using AjaxLink to open a new window using javascript. The problem is that the focus is not

Settings focus to window opened by javascript appended to AjaxLink

2008-02-07 Thread Grzel
Hello, I am using AjaxLink to open a new window using javascript. The problem is that the focus is not set on the new window (it is opened but stays behind, not visible to the user) Code add(new AjaxLink(btn) { @Override public void onClick(AjaxRequestTarget target) {