Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why won't the cursor change over a drop down box?

Status
Not open for further replies.

Draug

Programmer
Apr 18, 2001
77
CA
I have:
A frame that contains a form. In this form there are push buttons, options buttons, and drop down boxes.

I am trying to change the mouse cursor over each of these items. It changes on all of the elements except the drop down boxes.

This is what I use:
var elemArray = parent.myFrame.document.myForm.elements;
var length = elemArray.length
for(i=0; i<length; i++)
{
elemArray.style.cursor = &quot;hand&quot;;
}

Why does it not change over the drop down box? How can I make it change over the drop down box?

Thanks in advance.
 
Anyone????

Is it even possible to change cursor over an active drop down box?
 
Well you are using the wrong attribute -- it should be cursor=&quot;pointer&quot;

The CSS Spec is at:


It should work -- if not then its a bug in IE (which I assume you are using since you said hand....)

===
Supports Mozilla and Web Standards
Knows HTML/XHTML, CSS1, JavaScript, PHP, C++, DOM1
===
 
cursor:hand is a perfectly acceptable cursor style, at least for IE. Unfortunately it doesn't seem to work over a select box. I can get the text color to change, so I know the style is working, but the cursor does not change. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Thanks for the response.

Ya, I forgot to explicitly mention that I am using IE 5 only.

I am in the same boat as tsdragon. I know the style attribute is working fine, but the property for the cursor does not seem to change.

Will it work different in IE 5.5?

Thanks,
Draug
 
The version I tested it with is 5.50.4522.1800. It didn't work on the drop down, but did over a span. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Did the Span work with IE 5? I have never used a Span before.... :)
 
Span works fine. I use span to emulate the behavior of an href link using onmouseover and onmouseout to change the color and cursor style of the span, and onClick to call a function. Unfortunately, I tried putting the dropdown in a span like that and it still didn't do what you want.
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Ya, I have now tried Span as well. You are correct, it does not allow me to change the cursor over an active dropdown box.

Does anyone know how to do this? I am thinking it is impossible to do.

Thanks,
Jason
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top