-
position of mouse in NN6
I need to know exact position of mouse pointer. In IE5 "event.clientX" returned
position of mouse in pixels, but this is not working in NN6. How to get position
of mouse pointer in NN6?
-
Re: position of mouse in NN6
"Riki Fridrich" <acid@pobox.sk> wrote:
>
>I need to know exact position of mouse pointer. In IE5 "event.clientX" returned
>position of mouse in pixels, but this is not working in NN6. How to get
position
>of mouse pointer in NN6?
I haven't tried it in NN6 but try "Event.pageX" I use this in NN4 for locating
mouse positions
-
Re: position of mouse in NN6
"vhwarrior" <vhwarrior@home.com> wrote:
>
>"Riki Fridrich" <acid@pobox.sk> wrote:
>>
>>I need to know exact position of mouse pointer. In IE5 "event.clientX"
returned
>>position of mouse in pixels, but this is not working in NN6. How to get
>position
>>of mouse pointer in NN6?
>
>I haven't tried it in NN6 but try "Event.pageX" I use this in NN4 for locating
>mouse positions
Hi
I can't get Netscape 6 to return the correct image co-ordinates
I have a couple of functions that return the bottom left co-ords of an image
when ever I mouseover it.
It works fine in ie & Ns4 but not in NS6
Its showing the menu in NS6 but only where the mouse is and not positioned
at the bottom left of the images.
Please tell me whats missing, Im so close.
function calcMenuX (event, image) {
if (navigator.appName.substring(0, 9) == "Microsoft") {
return event.x-event.offsetX; // Handles IE
} else if (navigator.vendor == ("Netscape6") || navigator.product == ("Gecko"))
{
return event.pageX; // almost works in NS6 but not quite
} else {
return image.x; // Handles NS4
}
}
//v1.0 menu positioning
function calcMenuY (event, image) {
if (navigator.appName.substring(0, 9) == "Microsoft") {
return event.y-event.offsetY+image.height; // Handles IE
} else if (navigator.vendor == ("Netscape6") || navigator.product == ("Gecko"))
{
return event.pageY; // almost works in NS6 but not quite
} else {
return image.y + image.height; // Handles NS4
}
}
Cheers
Tony.
>
>
>
>
-
Re: position of mouse in NN6
"tony" <tony@netlink.net.nz> wrote:
>
>"vhwarrior" <vhwarrior@home.com> wrote:
>>
>>"Riki Fridrich" <acid@pobox.sk> wrote:
>>>
>>>I need to know exact position of mouse pointer. In IE5 "event.clientX"
>returned
>>>position of mouse in pixels, but this is not working in NN6. How to get
>>position
>>>of mouse pointer in NN6?
>>
>>I haven't tried it in NN6 but try "Event.pageX" I use this in NN4 for locating
>>mouse positions
>
>
>Hi
> I can't get Netscape 6 to return the correct image co-ordinates
>I have a couple of functions that return the bottom left co-ords of an image
>when ever I mouseover it.
>It works fine in ie & Ns4 but not in NS6
>Its showing the menu in NS6 but only where the mouse is and not positioned
>at the bottom left of the images.
>Please tell me whats missing, Im so close.
>
>
>function calcMenuX (event, image) {
> if (navigator.appName.substring(0, 9) == "Microsoft") {
> return event.x-event.offsetX; // Handles IE
> } else if (navigator.vendor == ("Netscape6") || navigator.product ==
("Gecko"))
>{
> return event.pageX; // almost works in NS6 but not quite
> } else {
> return image.x; // Handles NS4
> }
> }
>//v1.0 menu positioning
>function calcMenuY (event, image) {
> if (navigator.appName.substring(0, 9) == "Microsoft") {
> return event.y-event.offsetY+image.height; // Handles IE
> } else if (navigator.vendor == ("Netscape6") || navigator.product == ("Gecko"))
>{
> return event.pageY; // almost works in NS6 but not quite
> } else {
> return image.y + image.height; // Handles NS4
> }
> }
>
>Cheers
>Tony.
>>
Try - image.offsetLeft & image.offsetTop
-
Re: position of mouse in NN6
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|