473,806 Members | 2,219 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

self.focus() not working in Opera?

WH
I put this line in HTML
<body bgcolor="#FFFFF F" onLoad="focus() ">

Both Mozzila and IE can do self.focus(). However Opera still does not take
the focus().
Jul 23 '05 #1
1 2355
WH <ke***@whitehou se.gov> wrote:
^^^^^^^^^^^^^^
You really want to refrain from spoiling namespaces
and from using a faked From/Reply-To address, see

<http://na.edit.client. yahoo.com/rogers/show_static?.fo rm=eua>
<http://www.hispeed.rog ers.com/yahoo/info/eua.jsp>
I put this line in HTML
<body bgcolor="#FFFFF F" onLoad="focus() ">
Do not use the "bgcolor" attribute without the "text", "link", "alink" and
"vlink" attributes, and, even better, use CSS instead of deprecated format
attributes.
Both Mozzila
What?
and IE can do self.focus().
But you cannot be sure that you call self.focus() here.
However Opera still does not take the focus().


Does the JavaScript Console show error messages?

Without an object reference in an intrinsic event handler attribute value,
the scope chain is followed, so it could be that Opera interprets `focus'
as `document.focus ', not `window.focus' == `self.focus'. That's also why
it is bad to write only `open(...)' within an event handler attribute value
as both the object referenced by `window' and the object referenced by
`document' have an open() method according to DOM Level 0 (for `window')
and DOM Level 0+ (for `document').

It could as well be that the DOM of the Opera version(s) you have been
testing with does not support Window.focus(). This method is part of
the proprietary DOM Level 0, it can be supported by a standards compliant
UA but does not need not to.

But why would someone want to focus the window containing the currently
loaded document, even if that worked?
PointedEars
--
Never learn by your misstakes, if you do you may never dare to try again...
Jul 23 '05 #2

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

Similar topics

4
4508
by: Stephen Poley | last post by:
The issue of the focus pseudo-class came up a few weeks ago, and I finally got around to trying it out (better late than never ...) The recommended order given for the pseudo-classes is link, visited, focus, hover, active. However: - Mozilla doesn't seem to do anything with the active rule; - IE gets things wrong as usual: it uses the active rule for focus; it ignores the focus rule; - Opera ignores both focus and active rules and...
7
13267
by: WH | last post by:
<html> <head> <style type="text/css"> html, body { overflow: hidden; } </style> </head> <body onload="showit()" leftMargin="0" rightMargin="0" topMargin="0"
14
4552
by: Mark | last post by:
Hi, At the top of my php file I have got :- <body onblur="self.focus();"> so when I click off onto another window, my window comes back up in front which is perfect. The problem however, is that when I try to type into my form boxes, the key transfers are all being lost (i.e. keyboard is disabled)!
0
9718
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
9596
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10617
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...
1
10370
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9186
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...
0
5545
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4328
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
3008
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.