473,402 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

How to set focus on a window in multi-tab windows

On firefox multi-tab, I open a window with ref=window.open(). It works. A new window is opened in a new tab. On parent window, there is button doing ref.focus(). But it won't put focus on that new window. So how do I set focus on a window in a multi-tab hosting?

Jack
Jan 22 '09 #1
5 17902
acoder
16,027 Expert Mod 8TB
The simple answer is you can't, but you can in browser-specific code, e.g. XUL, extensions, etc. - see https://developer.mozilla.org/en/Cod...Tabbed_browser
Jan 22 '09 #2
Thank you, acoder. After study the page mentioned, still have no idea about how to activate a specific tab on firefox. Do you have sample code about it? thank you very much!
Jan 23 '09 #3
acoder
16,027 Expert Mod 8TB
The sample code is there. It's a case of using it in the correct context.

Note that using this code would be Mozilla-specific making use of XUL. To get started, see https://developer.mozilla.org/en/XUL_Tutorial.
Jan 23 '09 #4
Thank you, acoder. I'm going to study that and have a try test.
Jan 27 '09 #5
I actually had this same question - here's a solution I found (I know this thread is old, but I know it can be useful to others)

I used:
Expand|Select|Wrap|Line Numbers
  1. ref=window.open().focus();
This will not work with all browsers, at least not yet, but it certainly will work with some, and it's worth a try!
Feb 20 '12 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: titouille | last post by:
Hi everybody ! first, sorry for my poor english, I'm french mothertongue ;) technologies : -------------- Python 2.3 Twisted Matrix 1.2.0 wxPython 2.5.1
1
by: Robert Dickow | last post by:
Here's an interesting problem: When Netscape Nav plays an embedded sound, the current window will lose focus. Specifically, a user may be typing into a text input field, but an embedded sound in...
31
by: Benno Bös | last post by:
If I use the following construct in the frame "main" for a link to an extern site: <A HREF="http://www.any.xy" TARGET="extern"> the Browser is creating the window "extern", loading the page...
1
by: WH | last post by:
I put this line in HTML <body bgcolor="#FFFFFF" onLoad="focus()"> Both Mozzila and IE can do self.focus(). However Opera still does not take the focus().
2
by: Elsa Luiz | last post by:
Hi everyone, I have this problem hope you could help me... I have an A.aspx page with a button, when I click the button I would like to open another window with containing B.aspx. The problem is...
5
by: Wei | last post by:
I need the current window stay on focus. The user will have to click on exit button to exit the window. How can I do this in asp.net in C#? Thank you
2
by: Charles | last post by:
Is there a way to detect if a window is out of focus? Here's what I need it for: I have a web-based chat application that one of the 2 people chatting may have the chat window open or minimized....
7
by: marty.overdear | last post by:
I am opening a new window using window.open. I need the new window to open on top of the parent everytime. I cannot use onBlur b/c the user will need to click back to the parent for information. ...
4
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...
3
by: acehigh1983 | last post by:
Is it possible to focus a window in firefox and safari?? i have a webpage that opens another window, it then focuses on the original window (the new window that opened now behind it in the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.