By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,606 Members | 3,802 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,606 IT Pros & Developers. It's quick & easy.

style.cursor on IE

P: n/a
IE does not change the cursor immediately after a style.cursor is
set. In the following sample, I have 2 divs, one inside another. The
inner has a cursor of crosshair, outer a hand.
If I click on the inner div, causing it to disappear, the mouse would
be over the outer div, but the cursor is still a crosshair. The
cursor will change to the correct cursor when I move the mouse.

<div style='cursor:hand;width:300;height:300'>
<div id='inner' style='cursor:crosshair;width:300;height:50'
onclick="this.style.display='none'">
Click to make this div disappear
</div>
</div>
Is there any way to force the cursor to change? On work-around is
doing a resizeBy(-1,0); resizeBy(1,0), but that is impractical for my
application.
Thansk,
Dat.
Oct 27 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Oct 27, 3:45*pm, "datv...@gmail.com" <datv...@gmail.comwrote:
IE does not change the cursor immediately after a style.cursor is
set. *In the following sample, I have 2 divs, one inside another. *The
inner has a cursor of crosshair, outer a hand.
If I click on the inner div, causing it to disappear, the mouse would
be over the outer div, but the cursor is still a crosshair. *The
cursor will change to the correct cursor when I move the mouse.

<div style='cursor:hand;width:300;height:300'>
* *<div id='inner' style='cursor:crosshair;width:300;height:50'
onclick="this.style.display='none'">
* * Click to make this div disappear
* *</div>
</div>

Is there any way to force the cursor to change? *On work-around is
doing a resizeBy(-1,0); resizeBy(1,0), but that is impractical for my
application.

Thansk,
Dat.
resizeBy also does not work if there are multiple tabs in IE.
and an access exception occurs if the mouse is down.
Oct 28 '08 #2

P: n/a
On Oct 27, 6:45*pm, "datv...@gmail.com" <datv...@gmail.comwrote:
IE does not change the cursor immediately after a style.cursor is
set. *In the following sample, I have 2 divs, one inside another. *The
inner has a cursor of crosshair, outer a hand.
If I click on the inner div, causing it to disappear, the mouse would
be over the outer div, but the cursor is still a crosshair. *The
cursor will change to the correct cursor when I move the mouse.

<div style='cursor:hand;width:300;height:300'>
The "hand" style is not standard. Use it only as a fallback for
"pointer." And 300 what?
* *<div id='inner' style='cursor:crosshair;width:300;height:50'
onclick="this.style.display='none'">
* * Click to make this div disappear
* *</div>
</div>

Is there any way to force the cursor to change? *On work-around is
Only hacks. I wouldn't worry about it.
doing a resizeBy(-1,0); resizeBy(1,0), but that is impractical for my
application.
Or any application.
Oct 28 '08 #3

P: n/a
Donale Anadell wrote this in the microsoft.internetexplorer forum...

>You might try making the following change to your "onclick" event:

onclick="this.style.display='none';this.style.cur sor='hand'">

Good luck,

Donald Anadell

I tried it and it inexplicably works!
On Oct 28, 1:49*pm, "datv...@gmail.com" <datv...@gmail.comwrote:
On Oct 27, 3:45*pm, "datv...@gmail.com" <datv...@gmail.comwrote:
IE does not change the cursor immediately after a style.cursor is
set. *In the following sample, I have 2 divs, one inside another. *The
inner has a cursor of crosshair, outer a hand.
If I click on the inner div, causing it to disappear, the mouse would
be over the outer div, but the cursor is still a crosshair. *The
cursor will change to the correct cursor when I move the mouse.
<div style='cursor:hand;width:300;height:300'>
* *<div id='inner' style='cursor:crosshair;width:300;height:50'
onclick="this.style.display='none'">
* * Click to make this div disappear
* *</div>
</div>
Is there any way to force the cursor to change? *On work-around is
doing a resizeBy(-1,0); resizeBy(1,0), but that is impractical for my
application.
Thansk,
Dat.

resizeBy also does not work if there are multiple tabs in IE.
and an access exception occurs if the mouse is down.
Oct 28 '08 #4

P: n/a
On Oct 28, 7:17*pm, "datv...@gmail.com" <datv...@gmail.comwrote:
Donale Anadell wrote this in the microsoft.internetexplorer forum...
You might try making the following change to your "onclick" event:
onclick="this.style.display='none';this.style.curs or='hand'">
Good luck,
Donald Anadell

I tried it and it inexplicably works!
It isn't hard to explain at all if you think about it. IE was
momentarily showing the cursor for the wrong element. You changed
that cursor. Unfortunately, you changed it to "hand."
Oct 29 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.