How to open a new browser window AND run Javascript through a single user interaction?

Posted by Gj on Stack Overflow See other posts from Stack Overflow or by Gj
Published on 2010-04-10T10:11:58Z Indexed on 2010/04/10 10:23 UTC
Read the original article Hit count: 223

Filed under:
|

Hi

I have an HTML page with a simple form.

When the user clicks "submit", I'd like a new window to open with the processed results of the form, AND to have the original page redirect somewhere else.

If I use a link with target="_blank", I can open the results window but not redirect the original page. If I use Javascript to try and open the new window and then redirect the current page, the opening of the new window gets blocked (at least by my Firefox's default popup blocker).

Is there any way to get both a new window and run some Javascript in the original page?

Thanks!

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about popup