473,618 Members | 3,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

processing onfocus in mozilla seems to keep my select from expanding

Hello,

I am using mozilla and javascript to change the style background color
for my select with onfocus() and back to white with onblur().

When i process onfocus(); i have to click on the select three times to
get the popup menu and everything seems slow. No errors are reported
in the console however it seems as if the click event is not being
processed after the focus event is processed.

I have looked through the groups and it appears as if there is no way
for me to force the popup open (expand contents).

I was reading the gecko dom docs; but am not absorbing the solution.

Any thoughts as to the problem, erros, solutions?

Thanks,

Eric

Jul 23 '05 #1
1 2379
Eric Trav wrote:
Hello,

I am using mozilla and javascript to change the style background color
for my select with onfocus() and back to white with onblur().

When i process onfocus(); i have to click on the select three times to
get the popup menu and everything seems slow.
I couldn't replicate your situation exactly, play code below.

In Mozilla, when the select is clicked on, the options drop-down opens,
onfocus fires and the background changes. The next click (anywhere in
the page) will cause the drop-down to close but the select keeps focus,
so the background does not change.

If the next click (number 3) is not on the select, the select loses
focus, onfocus to fires and the background is changed again.

IE's behaviour is very different. A click on the select causes the
onfocus to fire, the options drop-down opens, the background changes,
then the drop-down closes and the onblur fires. All from just one
click.

The only way to select an option is the old Mac-centric way of
mouse-down and drag to a selection. As soon as the mouse button is
released, the drop-down closes and onblur fires. About 90% of users
will likely never work out how to select an option.
No errors are reported
in the console however it seems as if the click event is not being
processed after the focus event is processed.
Which click event?

I have looked through the groups and it appears as if there is no way
for me to force the popup open (expand contents).
You can't (AFAIK) use JavaScript to get the options drop-down to open.

I was reading the gecko dom docs; but am not absorbing the solution.

Any thoughts as to the problem, erros, solutions?
Given the different behaviour of IE and Gecko browsers, I'd give it a
miss. There seems little point in doing it, except maybe for users
using keyboard navigation to provide extra highlight when the select
element has focus. Even then, IE's effort is just to put a border
around the element in the chosen background colour.

<!-- play code -->

<form action="" name="formA">
<select name="selA"
onfocus="this.s tyle.background Color='red';"
onblur="this.st yle.backgroundC olor='white';"

<option>opt 0</option>
<option>opt 1</option>
<option>opt 2</option>
</select>
<input type="reset">
</form>
--
Rob
Jul 23 '05 #2

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

Similar topics

2
7267
by: Mike Berger | last post by:
So, I'm fairly new to this and my code is as follows... <script language="JavaScript> var oldValue function focusElement(theElement) { oldValue = theElement.value; return; } </script>
4
2393
by: Scott Navarre | last post by:
Hi, I have Red Hat 8.0 and have the default Mozilla browser that comes with it. I am programming in javascript and have come across something problematic. Given the following code: <HTML> <HEAD> </HEAD> <BODY> <FORM>
1
23193
by: Marek Mänd | last post by:
<select multiple style="height:200px;"> <option>a <option>b </select> Why does Mozilla draw the vertical scrollbar to the SELECT html element? There is plenty of void room below two OPTIONs in the SELECT box, so there is no need for that. How do i get the overflow:auto like thing working in mozilla based
3
2566
by: Parrot | last post by:
Does anyone else have a problem with the Mozilla browser not expanding a multi-line textbox to its proper size? My textboxes are all small and do not display mu;tiple lines in Mozilla or Netscape but are ok in Internet Explorer. Is there a reason for this and can it be fixed? Dave Uphoff
2
3983
by: swathi | last post by:
----------------------------------------------------------------------- A poll associated with this post was created, to vote and see th results, please visit http://www.forum4designers.com/message103437.htm ----------------------------------------------------------------------- Question: iframe onfocus problem in mozilla browse - attached zip fil - multi.html in attached zi...
2
7289
by: Don | last post by:
What does the onfocus value of "this.select()" do in the following <input...> tag? <input type=text name="img" size=20 onfocus="this.select()" value="http://" tabindex=7> Thanks, Don ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
0
5148
by: Kalpesh | last post by:
Hi All, I am using .net crystal reports to develop the reports. The version of crystal report assemblies is 10.2.3600.0. When i run the reports i got following error. #region Retry Report Data into Dataset if (criteria == "") { dsregional = new DataSet();
2
2025
by: Gary Hasler | last post by:
I am having various problems with web pages on our site not displaying the result of form submissions properly for users with Mozilla type browsers (eg Firefox, Netscape). After investigation I have determined it is because Mozilla often (but not always) repeats the request for a web page. Therefore, when a page is showing the result of a form posting or a redirect, the second request either has no results to show or is repeating the...
1
2414
by: partlocator | last post by:
I'm checking on some code my developer did for a form on our site. The code relates to a submit button and I'm not sure if it's functioning properly. I ran the javascript through javascriptlint.com/ online_lint.php and a few warnings popped up, but I'm not sure if these warnings amount to much. Here's the code for the submit button: <input type="submit" name="next" class="btn" onclick="saveButtonClicked(name, 'VehicleButton');"...
0
8153
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
8653
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
8595
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
8455
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...
1
6101
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
5552
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4065
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
4150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1760
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.