Setting focus to new window

K

kloppie

Hi there,

im working on a page which causes me problems - the page contains of a
couple of controls where the user can choose some options for a Report.
When the user then clicks a button "Submit" the server-side code saves
the users selected options into Session-variables and then registers a
startup-clientscript. This script calls the javascript function
"window.open".
My problem is that the new window does not get focus, it hiddes behind
the parent window.
I tried calling focus() in "onload" of the body of the new window, but
that is not fired until the entire page is loaded - i want it to get
focus immediatly.
Is that possibly?

I hope somebody can help me out here,

Regards, Martin
 
G

Greg9Strat

Is the javascript command "window.open()" the last command in script?
Wondering if other scripts are conflicting...

As to your other question, I believe you could put a
<script>getfocus...</script> block in the header to fire before the
"onload" command is fired for page body.

HTH
 
K

kloppie

Hi Greg9Strat,

tried the <script>getfocus.... but that didn't work either.

It seems like the new window gets focus but then the parent window does
some processing and therefore gets the focus back...


Greg9Strat skrev:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top