Setting focus to new window

  • Thread starter Thread starter kloppie
  • Start date Start date
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
 
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
 
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:
 
Back
Top