Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Setting focus to new window

Reply
Thread Tools

Setting focus to new window

 
 
kloppie
Guest
Posts: n/a
 
      11-28-2006
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

 
Reply With Quote
 
 
 
 
Greg9Strat
Guest
Posts: n/a
 
      11-29-2006
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" <(E-Mail Removed)> 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


 
Reply With Quote
 
 
 
 
kloppie
Guest
Posts: n/a
 
      11-29-2006
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" <(E-Mail Removed)> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
window.focus() brings source code into focus Spizzat2 Javascript 2 01-09-2008 03:45 PM
emulating window.focus in Body onload() event and setting focus to a control on same page Jason ASP .Net 4 05-07-2007 05:54 PM
this.window.focus() vs. window.focus() vs. this.focus() Roger Javascript 3 03-08-2007 08:53 PM
focus on the new window.open window Csaba Gabor Javascript 4 12-01-2005 10:20 AM
Setting Window Title On New Window Daniel Morrissey ASP .Net 3 07-15-2003 02:59 PM



Advertisments