473,698 Members | 2,833 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.ope n".
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

Nov 28 '06 #1
2 1154
Is the javascript command "window.ope n()" the last command in script?
Wondering if other scripts are conflicting...

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

HTH

On Nov 28, 3:14 pm, "kloppie" <klopp...@hotma il.comwrote:
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.ope n".
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
Nov 29 '06 #2
Hi Greg9Strat,

tried the <script>getfocu s.... 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.ope n()" the last command in script?
Wondering if other scripts are conflicting...

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

HTH

On Nov 28, 3:14 pm, "kloppie" <klopp...@hotma il.comwrote:
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.ope n".
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
Nov 29 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2931
by: Andi B | last post by:
Greetings all, and many thanks for your helpful replies to my earlier post today. I have another question now, if you would be so kind again: How do I make it so that the cursor appears in a text field automatically when a web page loads, or after data has been cleared from the field with a clear button? Regards
9
8714
by: Guus Ellenkamp | last post by:
I want to use a second window to link to and put new content in it and pop up is some link is clicked. How to set the focus to the second window if it's already open. With what I do now, the window stays below my main window.
20
12297
by: Arne | last post by:
During testing <div style="overflow:auto;"> in CSS I noticed the mousewheel would work in Mozilla only after I made a <a href="#">some text</a> link and clicked on that, within the div. It appears as if Mozilla needs to have the focus set on that div in order for the mousewheel to work. That's all that link does. The mousewheel works perfectly in IE without the link. It scrolls the div even if there is a scrollbar on the page. Is...
2
7518
by: dsnyder | last post by:
This HTML has a bit of Javascript at the end that puts the initial focus on the userID field. It works great on Windows2000 running IE6, but the initial focus never goes to the userID field on Windows 2003 PocketPC (Windows Mobile) running Pocket IE. <html><head><title>WMS - P280WF100 - Login</title><META HTTP-EQUIV='expires' VALUE='0'> </head> <body> <form name="frmLogon" action='p280wp100' method='get'>
8
2137
by: Brad Isaacs | last post by:
Good morning friends, I am working with Visual Studio 2005, ASP.NET 2.0 I am working with the Login controls provided my .NET 2.0, trying to make the Login1 control UserName textbox obtain SetFocus upon load of the .aspx web page but I cannot for the life of me get this to work. I tried using the defaultfocus on the Form but that did not work.
5
2037
by: Finn Stampe Mikkelsen | last post by:
Hi How can i set a focus to a textbox in my codebehind page?? I have this WebForm, that takes information from a user and 2 buttons on the form. One that takes action on the entered information and one that resets the form... The second on, the reset button, i would like to set focus back to the first textbox on the form. I already have an onload in my body, which sets the
4
68029
by: Roger | last post by:
Hi, I am confused about the differences between this.window.focus(), window.focus(), and this.focus(). I want to use the calls in a <body onload="..."tag. What are the differences between these forms that may make one succeed and another fail? In particular, this.window.focus() fails in Opera 9.10 with an "object not found", and windows.focus() succeeds in Opera 9.10, Firefox 2.02, and IE 7.
4
4052
by: Jason | last post by:
Hi, Here's the scenario: I have a web application that has window A and window B. A user has both window A and B open - window A is in the foreground and window B is behind it. If the user looking at window A clicks the "open window B" link, I want
2
2227
by: Stephan Steiner | last post by:
Hi I need to start a GUI application from a console app. Upon startup, the application can display one or two popups, which need clicking away. I have all this handled using FindWindow, GetDLGCtrlID and PostMessage respectively (find window, find control ID of the button that needs pressing, and press the button). However, the software in question will only bring up the popup if it is in the foreground. So I'm using...
0
8683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9170
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9031
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8876
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7741
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6531
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4624
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.