3.2.0

URGENT ISSUE!!!! Cant use mousemove and up

I am trying to track mouse movement and mouse up within the cell.

So I use obj.onCellMouseUp to catch the mouse up.

I use obj.setEvent to catch the mousemove events.

The problem is the mousemove does not allow the mouseup to be called!!

Please - anyone who can help - need this urgently.
Joel
October 1,
The following code works fine for me on FireFox 1.5 and IE6 on Windows XP:

var obj = new AW.UI.Grid;
    obj.setCellText(function(i, j){return j + "." + i});
    obj.setHeaderText("header");

    obj.onCellMouseUp = function (e,col,row) {
        alert("mouseUp: "+col+" "+row);
    }

    obj.setColumnCount(10);
    obj.setRowCount(100);

    obj.setCellEditable(true);

    document.write(obj);
Ankur Motreja
October 1,
Sorry, replied too quickly.
Try this code instead which works fine for me:

<script>

    var obj = new AW.UI.Grid;
    obj.setCellText(function(i, j){return j + "." + i});
    obj.setHeaderText("header");

    obj.onCellMouseUp = function (e,col,row) {
        document.getElementById("theDiv").innerHTML = document.getElementById("theDiv").innerHTML + "<BR>mouseUp: "+ col +" "+ row;
    }

    obj.onCellMouseDown = function (e,col,row) {
        document.getElementById("theDiv").innerHTML = document.getElementById("theDiv").innerHTML + "<BR>mouseDown: "+ col +" "+ row;
    }

    obj.onCellMouseOut = function (e,col,row) {
        document.getElementById("theDiv").innerHTML = document.getElementById("theDiv").innerHTML + "<BR>mouseOut: "+ col +" "+ row;
    }

    obj.onCellMouseOver = function (e,col,row) {
        document.getElementById("theDiv").innerHTML = document.getElementById("theDiv").innerHTML + "<BR>mouseOver: "+ col +" "+ row;
    }

    obj.setColumnCount(10);
    obj.setRowCount(100);

    obj.setCellEditable(true);

    document.write(obj);

</script>

<div id="theDiv"></div>


On clicking the cells one by one from the top left, I got the following output in the DIV:

mouseOver: 0 0
mouseDown: 0 0
mouseUp: 0 0
mouseOut: 0 0
mouseOver: 1 0
mouseDown: 1 0
mouseUp: 1 0
mouseOut: 1 0
mouseOver: 2 0
mouseDown: 2 0
mouseUp: 2 0
mouseOut: 2 0
mouseOver: 3 0
mouseDown: 3 0
mouseUp: 3 0
mouseOut: 3 0

Ankur Motreja
October 1,
Ankur,

Thanks, but I am asking about the combination of cell mouse up and mouse MOVE. You don't have move in your code.
Joel
October 1,
Never mind - I figured this out.

I'll post my code in the next few days...
Joel
October 1,

This topic is archived.

See also:


Back to support forum