473,394 Members | 1,742 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

style.cursor on IE

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
4 5271
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Csaba2000 | last post by:
The following code has me so confused, I don't even know the right questions to ask. Opera 7.01 and IE 5.5 both exhibit behaviours I don't understand while NN 6.1 seems to ignore me altogether. ...
3
by: Csaba2000 | last post by:
I have set onmousedown to change the cursor, but this setting is ignored (IE 5.5; NN 6.1 on Win 2K Pro) until the mouse is either moved or the mouse button is released. On Opera 7.01, the setting...
1
by: Yaron Cohen | last post by:
Hi, I would like to ask for your help (I am using only IE5.5). I have a very big table that I would like to sort. During the sort I would like the cursor changed to 'wait' state and back to...
18
by: Randall Sell | last post by:
http://www.bytewise.com.au/test/iebug.html I can not see why this doesn't work under IE6. Perhaps someone can shed some light on this, and a possible hack to get it to work. My ultimate goal is...
21
by: Michael Bierman | last post by:
Please forgive the simplicy of this question. I have the following code which attempts to determine the color of some text and set other text to match that color. It works fine in Firefox, but does...
19
by: CES | last post by:
All, I don't know why I always get stuck on the stupid questions... This is pretty straight forward... I want to change the cursor to the hand on a mouse event. This works just fine, if I use...
1
by: nikki.farrah | last post by:
Hi all, this is my first time posting so any help is appreciated! I am doing a simple AJAX request to our server, and I would like the cursor style changed to 'wait' when the user clicks a button...
1
by: ryezack | last post by:
i have an image map with an onmouseover event thats calls a javascript function style cursor is hand. this works in IE but not in firefox. here's the code: <script type="text/javascript"> <!--...
1
by: whitelined | last post by:
Does Opera have problems setting cursor style? I have the following code that works in FF & IE: this.pane.style.cursor = 'ne-resize'; It kind of works in opera, but seems to be variable to say...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.