Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > onmousemove tracking works in IE - not in Firefox

Thread Tools

onmousemove tracking works in IE - not in Firefox

Posts: n/a
I've inherited some script that properly traces out a "rectangular
box" on a map in IE6 and IE7 but in Firefox the path of the mouse is
not visible. Could someone have a look and suggest something?

1. Browse to:
2. Click the Zoom Box tool above the map (should change to yellow when
3. Move mouse into map area and "draw" a zoom box by dragging out a
rectangle of choice

The zoom takes effect but the visible tracing of the rectangular zoom
box is only present with IE. With Firefox, there is no "feedback" to
the user while tracing out the "box".

I know the event model for FF is slightly different than IE. I think
the problem lies with the updateBand function in but I don't
know how to fix for Firefox. Here is a snippet of that code:

// update rubber band
function updateBand(evt) {
var band = locateElement("band");
if (band != null) {
// move band taking care of different browsers
if (ie) {
evt = event;
var map = locateElement("map");
if (evt.srcElement != map)
return; = selectMin(bandX, evt.offsetX +
GetOffsetLeft(map)); = selectMin(bandY, evt.offsetY +
GetOffsetTop(map)); = selectMax(bandX, evt.offsetX +
GetOffsetLeft(map)) -; = selectMax(bandY, evt.offsetY +
GetOffsetTop(map)) -;
} else { = selectMin(bandX, evt.pageX); = selectMin(bandY, evt.pageY); = selectMax(bandX, evt.pageX) -
parseInt(; = selectMax(bandY, evt.pageY) -

Reply With Quote

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 Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox doesn't process onmousemove Javascript 7 09-07-2006 12:07 PM
firefox onmousemove and dragging issues davefromalbury Javascript 8 01-13-2006 10:51 AM
Tracking Someone Tracking Me Edw. Peach Computer Security 4 07-07-2005 05:50 PM
document.onmousemove not working quite right help? Gary Mayor Javascript 3 03-04-2004 12:58 PM
onmousedown onmousemove events not working correctly!!! Jippie Javascript 0 01-23-2004 12:02 PM