-
comboBox onfocus=this.style.backgroundColor = '#FFFFFF' cause click twice.
I have one textbox and one combobox right now. The problem is , i set onfocus for text area and when i click on it, the textbox colour will change. I use the same method for combobox but it turned out that i click 1st time, background colour changed... click 2nd time, then only the combobox list is shown.
Thanks again
Last edited by drumhitz; 09-06-2007 at 05:43 AM.
-
I'm not sure I understand. What do you mean only the combo box list is shown? Are you saying the text box disappears? Or the color no longer displays?
-
Sorry to make you confused actually, forget the textbox part. Im using the 'onfocus' for my combobox. I want the effect to be like when I click it, it will change it background colour and list down the menu.
Now my case is when i clicked 1st time, the background colour changed, I need to click 2nd time then only the list is drop down.
Can this be solved? many thanks...
-
So you're saying on the 1st click the box doesn't drop down? Change the event from onfocus to onclick.
-
I changed it to onclick but the problem remains. Need to click twice then only the list will drop down and stay still.
onclick=" this.style.borderWidth = '2px'; this.style.backgroundColor = '#FFFFFF' "
Everytime the colour changed, the dropdownlist will automatically close. I'm thinking to have a javascript to make the dropdownlist open and stay still automatically after it closed at the 1st time. Is this possible ?
Thanks
-
I just tested and it works fine here. Only issue I see is that in IE6 the options background doesn't change, just the select box itself. You'll probably have to change the options backgrounds also, for IE
-
fyi..
I'm using IE 7 and it still cannot work, need to click twice only the combobox will drop down the list and stay still. If click once , I can notice the list drop down but it immediately turn off and user cannot select the option in it.
I try to use Firefox and the problem is solved. How to settle the problem in IE 7 ? On the other hand, can you show me the java script on how you make the combo box drop down its list?
Many thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks