Technology Questions

Go Back   Technology Questions > Software Questions > Internet > Internet Explorer

Internet Explorer Discuss IE7 or any other IE version.

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 03-28-2009, 10:35 PM
datvong@gmail.com
Newsgroup Contributor
 
Posts: n/a
style.cursor does not change cursor until after mouse move

In the following example, I have 2 divs, one inside another, with two
different cursors.

<div id='outer' style='cursor:hand;width:300px;height:300px'>
<div id='inner' style='cursor:crosshair;width:100px; height:100px'
onclick="this.style.display='none'">
Click to remove this div.
</div>
</div>

When I click on the inner div, I would expect the cursor to change
from 'crosshair' to 'hand'. Instead, it stays as a 'crosshair' until
I move the mouse.
Is there anyway to get IE to change the cursor immediately after the
div is invisible?

One solution I googled is using window.resizeBy(1,0) and
window.resizeBy(-1,0).
This solution is not practical because
1. It doesn't work if the browser has multiple tabs. and
2. An access violation occurs if the mouse is down.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 03-28-2009, 10:35 PM
  #2 (permalink)  
Old 03-28-2009, 10:36 PM
Donald Anadell
Newsgroup Contributor
 
Posts: n/a
Re: style.cursor does not change cursor until after mouse move


<datvong******.com> wrote in message
news:fa3ba1c2-f1cc-4ba5-a974-4759d21633b4@m36g2000hse.googlegroups.com...
> In the following example, I have 2 divs, one inside another, with two
> different cursors.
>
> <div id='outer' style='cursor:hand;width:300px;height:300px'>
> <div id='inner' style='cursor:crosshair;width:100px; height:100px'
> onclick="this.style.display='none'">
> Click to remove this div.
> </div>
> </div>
>
> When I click on the inner div, I would expect the cursor to change
> from 'crosshair' to 'hand'. Instead, it stays as a 'crosshair' until
> I move the mouse.


> Is there anyway to get IE to change the cursor immediately after the
> div is invisible?


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


>
> One solution I googled is using window.resizeBy(1,0) and
> window.resizeBy(-1,0).
> This solution is not practical because
> 1. It doesn't work if the browser has multiple tabs. and
> 2. An access violation occurs if the mouse is down.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 03-28-2009, 10:38 PM
datvong@gmail.com
Newsgroup Contributor
 
Posts: n/a
Re: style.cursor does not change cursor until after mouse move

Thank you Donald! I don't know why it works, but it does!!!
Thanks!!!


On Oct 28, 5:46*am, "Donald Anadell" <danad...@nospamersmikrotec.com>
wrote:
> <datv...******.com> wrote in message
>
> news:fa3ba1c2-f1cc-4ba5-a974-4759d21633b4@m36g2000hse.googlegroups.com...
>
> > In the following example, I have 2 divs, one inside another, with two
> > different cursors.

>
> > <div id='outer' style='cursor:hand;width:300px;height:300px'>
> > *<div id='inner' style='cursor:crosshair;width:100px; height:100px'
> > onclick="this.style.display='none'">
> > * Click to remove this div.
> > *</div>
> > </div>

>
> > When I click on the inner div, I would expect the cursor to change
> > from 'crosshair' to 'hand'. *Instead, it stays as a 'crosshair' until
> > I move the mouse.
> > Is there anyway to get IE to change the cursor immediately after the
> > div is invisible?

>
> 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
>
>
>
> > One solution I googled is using window.resizeBy(1,0) and
> > window.resizeBy(-1,0).
> > This solution is not practical because
> > 1. It doesn't work if the browser has multiple tabs. *and
> > 2. An access violation occurs if the mouse is down.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4 (permalink)  
Old 03-28-2009, 10:38 PM
Donald Anadell
Newsgroup Contributor
 
Posts: n/a
Re: style.cursor does not change cursor until after mouse move


<datvong******.com> wrote in message
news:a20c17f9-e2d2-48a4-a796-77153bd85867@40g2000prx.googlegroups.com...
>Thank you Donald! I don't know why it works, but it does!!!
>Thanks!!!


You're welcome.

Good luck,

Donald Anadell




On Oct 28, 5:46 am, "Donald Anadell" <danad...@nospamersmikrotec.com>
wrote:
> <datv...******.com> wrote in message
>
> news:fa3ba1c2-f1cc-4ba5-a974-4759d21633b4@m36g2000hse.googlegroups.com...
>
> > In the following example, I have 2 divs, one inside another, with two
> > different cursors.

>
> > <div id='outer' style='cursor:hand;width:300px;height:300px'>
> > <div id='inner' style='cursor:crosshair;width:100px; height:100px'
> > onclick="this.style.display='none'">
> > Click to remove this div.
> > </div>
> > </div>

>
> > When I click on the inner div, I would expect the cursor to change
> > from 'crosshair' to 'hand'. Instead, it stays as a 'crosshair' until
> > I move the mouse.
> > Is there anyway to get IE to change the cursor immediately after the
> > div is invisible?

>
> 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
>
>
>
> > One solution I googled is using window.resizeBy(1,0) and
> > window.resizeBy(-1,0).
> > This solution is not practical because
> > 1. It doesn't work if the browser has multiple tabs. and
> > 2. An access violation occurs if the mouse is down.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: mouse cursor move AB Internet Explorer 1 03-28-2009 08:26 PM
cursor keyboard touch pad very sensitive and cursor bounces around petro Windows Vista 2 05-20-2008 08:30 AM
cursor in text field won't move KSW Windows XP 1 03-28-2007 11:15 AM
Mac OS X Mouse Cursor Color Change Kevin Apple Macintosh Hardware 0 02-06-2007 05:07 PM
How do I move the cursor when inking? Dave Leer Windows XP Tablet PC Newsgroup 4 05-13-2005 12:18 PM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 10:26 PM.


2003 - 2009 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0