You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Adriano dos Santos Fernandes <ad...@uol.com.br> on 2008/10/24 21:18:01 UTC

Redirect to a page on a new browser window

In a non-Wicket application, I had a page for report parameters editing 
and an execute button. Parameter validation was is Javascript, and I 
want my report opening on a new browser window. I done it with a <form 
target="_blank"> tag.

Now with Wicket, I succeeded done the same thing but I have problem with 
the browser preventing the (bad, in its opinion) popup from opening.

My form has a feedbackpanel, so I believe I can't use the same 
technique. I have created an AjaxButton on it, and on its onSubmit I 
call target.appendJavascript("window.open(...)").

Do you see a way to do it without the browser interfere in the new 
window opening?

Thanks,


Adriano


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Redirect to a page on a new browser window

Posted by Igor Vaynberg <ig...@gmail.com>.
you will need to reshuffle your code so that it opens the window and
all processing happens inside that window rather then in the ajax
behavior. that way you can just add window.open piece to the onclick
of whatever and pass all the necessary attributes on the url.

-igor

On Wed, Oct 29, 2008 at 6:09 AM, Adriano dos Santos Fernandes
<ad...@uol.com.br> wrote:
> To make this work in Firefox with window.open, it seems I need Sjax
> (synchronous) to call window.open just inside the onclick handler. Is it
> possible in Wicket, in any way?
>
>
> Adriano
>
>
> Adriano dos Santos Fernandes escreveu:
>>
>> In a non-Wicket application, I had a page for report parameters editing
>> and an execute button. Parameter validation was is Javascript, and I want my
>> report opening on a new browser window. I done it with a <form
>> target="_blank"> tag.
>>
>> Now with Wicket, I succeeded done the same thing but I have problem with
>> the browser preventing the (bad, in its opinion) popup from opening.
>>
>> My form has a feedbackpanel, so I believe I can't use the same technique.
>> I have created an AjaxButton on it, and on its onSubmit I call
>> target.appendJavascript("window.open(...)").
>>
>> Do you see a way to do it without the browser interfere in the new window
>> opening?
>>
>> Thanks,
>>
>>
>> Adriano
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Redirect to a page on a new browser window

Posted by Adriano dos Santos Fernandes <ad...@uol.com.br>.
To make this work in Firefox with window.open, it seems I need Sjax 
(synchronous) to call window.open just inside the onclick handler. Is it 
possible in Wicket, in any way?


Adriano


Adriano dos Santos Fernandes escreveu:
> In a non-Wicket application, I had a page for report parameters 
> editing and an execute button. Parameter validation was is Javascript, 
> and I want my report opening on a new browser window. I done it with a 
> <form target="_blank"> tag.
>
> Now with Wicket, I succeeded done the same thing but I have problem 
> with the browser preventing the (bad, in its opinion) popup from opening.
>
> My form has a feedbackpanel, so I believe I can't use the same 
> technique. I have created an AjaxButton on it, and on its onSubmit I 
> call target.appendJavascript("window.open(...)").
>
> Do you see a way to do it without the browser interfere in the new 
> window opening?
>
> Thanks,
>
>
> Adriano
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org