which mouse button pressed

Still struggling with implementing my custom drag and drop operation ...

can someone tell me if it's possible to tell which mouse button is being pressed (if any) when an onmouseout message is generated? I want to know if the left mouse button is being pressed:

function MyOnMouseOutHandler()
{
    if (event.button == 1) {
        alert("Yes left mouse button was held down when leaving!")
    }
}
LVL 7
minnirokAsked:
Who is Participating?
 
LakioCommented:
"in internet explorer this will get called, but in firefox this is never called. Does firefox have anything like that?"
- no I dont think so

take a look and see who they did it
http://elouai.com/javascript-drag-and-drop.php
http://www.walterzorn.com/dragdrop/dragdrop_e.htm
0
 
minnirokAuthor Commented:
Hi Lakio,

I was trying to implement my own drag and drop by using the default onclick, onmove, onmouseout - but they keep getting overridden by the actual ondragstart handlers. It seems like in internet explorer ondragstart gets called ok, but in firefox it does not? I have something like the following:

<div id = "mydiv" ondragstart="alert('hello')"></div>

in internet explorer this will get called, but in firefox this is never called. Does firefox have anything like that?

Thanks
0
 
minnirokAuthor Commented:
Thanks Lakio, the first link was simple enough to incorporate. I needed to make some changes to get it to work the way I want. I do have one more question regarding it which I'll post in a moment.
0
 
LakioCommented:
np m8 but so you now I think http://www.walterzorn.com/dragdrop/dragdrop_e.htm has a better script
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.