Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Setting focus to new window (http://www.velocityreviews.com/forums/t383159-setting-focus-to-new-window.html)

kloppie 11-28-2006 09:14 PM

Setting focus to new window
 
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


Greg9Strat 11-29-2006 12:26 AM

Re: Setting focus to new window
 
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

On Nov 28, 3:14 pm, "kloppie" <klopp...@hotmail.com> wrote:
> 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



kloppie 11-29-2006 12:34 PM

Re: Setting focus to new window
 
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:
> 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
>
> On Nov 28, 3:14 pm, "kloppie" <klopp...@hotmail.com> wrote:
> > 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




All times are GMT. The time now is 05:54 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.