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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the mouse pointer icon....

Status
Not open for further replies.

froggerIII

Programmer
Jul 19, 2000
119
US
In the application I am writing, instead of regular checkboxes, we are using images (one with a blank box, and one with a check in the box). In netscape, when the user clicks on the image, the box gets checked, but the mouse pointer remains an hourglass, not a the usual hand that appears when the mouse pointer is over an image. Is there a way to control the mouse pointer icon with javascript?
 
One solution that I used is to put the image in a table and have the <td> style set to cursor:hand. eg)

<table>
<tr>
<td style=&quot;cursor:hand&quot;><img>....</img></td>
</tr>
</table>

You can try this!
 
well, i am using lots of divs (keep in mind that netscape really loves divs) using style anywhere inside a div, messes everything up for me. i tried this:

<style>
#hand {cursor: hand}
</style>
<TD id=hand>.....

alas, it didn't work. do you have any other input for me?
 
You can try referencing the object by JavaScript.

eg)

document.divID.cursor=&quot;hand&quot;

This can be used with onmouseover and onmouseout

onmouseover=&quot;document.divID.cursor='hand'&quot;
onmouseout=&quot;document.divID.cursor='default'&quot;

Of course this is for netscape. IE references it like: document.all.divID.style.cursor=&quot;hand&quot;

Hope this helps!
 
I have this problem also, and it's VERY annoying!! If you can solve it please post the script/solution here...thanks
 
thedamager, I take it wood's solutions didn't work for you either.
 
FroggerIII, No it didn't, I am only in a table though, not a div. I thought that the cursor stlye could only be used in IE?

I am sure it is something to do with the javascript envolved, it seems fine in IE. I also have a problem with another script>>

When I use a button to activate a script which re-writes a document, I have to press the button twice in netscape, but only the usual once in IE. I'm fairly sure that this can be fixed, but I don't know about our similar problem...

If you want a have a look at the source(be prepared, I dont think it's the greatest code in the world!) it's in the menu on the left. Try going up or down...

 
cursor styles are a css2 spec, thus not at all supported by netscape, and only partially supported by ie.
 
so, theEclipse, are you implying that there is absolutely no way to solve this problem?
 
Are you using <input type=&quot;image&quot;> for your checkbox or just placing an 'onClick=' statement in an <img> tag?

I am using just an 'onClick=' in the <img> tag, are we doing it the same way? Maybe using the <input> tag would be better? I will try it...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top