:: Forum >> Version 2 >>

Problems to obtain clientX and clientY on the cell ‘indicator’ chunk of code

More information on this topic is available in the documentation section: /grid.examples/indicator-template.html.

Hi,

I used the ‘cell- indicator’ chunk of code, with an onmouseover event, which intend to show a small image near by the cell (on each row), but I got some problems to establish the right use on clientX and clientY

obj.onCellIndicatorMouseOver = function(eventcolrow){ 
document.getElementById("paso_sensor_dia_hora").style.left window.event.clientX 15
document.getElementById("paso_sensor_dia_hora").style.top window.event.clientY 95
document.getElementById("paso_sensor_dia_hora").style.visibility "visible";
}
 
This code, work just fine on IE, but not on FF, any idea, obviously is an document object reference problems, an not AW issue, anyway help will be grateful.

saludos, raul
Raul
Monday, April 24, 2006
Normally event is passed to the event handler function as a first argument, so maybe it will work if you use event instead of window.event?
Alex (ActiveWidgets)
Tuesday, April 25, 2006
Yes, my first thought, but event is passing a string like

<span id="aw33-cell-4-5" class="aw-item-template aw-templates-text aw-indicator-visible aw-grid-cell aw-column-4 aw-cells-normal" title="" aw="cell"><span id="aw33-cell-4-5-box-ruler" class="aw-item-ruler"></span><span id="aw33-cell-4-5-box-text" class="aw-item-text">TERRA</span><span id="aw33-cell-4-5-box-indicator" class="aw-pass-indicator" onclick="AW(this,event)" onmouseover="AW(this,event)" onmouseout="AW(this,event)"></span></span>

Not the event handler, the first try was simply event.clientX, but I get and error and halt on IE and undefined on FF

Yes, my first thought too, but event is passing a string like

<span id="aw33-cell-4-5" class="aw-item-template aw-templates-text aw-indicator-visible aw-grid-cell aw-column-4 aw-cells-normal" title="" aw="cell"><span id="aw33-cell-4-5-box-ruler" class="aw-item-ruler"></span><span id="aw33-cell-4-5-box-text" class="aw-item-text">TERRA</span><span id="aw33-cell-4-5-box-indicator" class="aw-pass-indicator" onclick="AW(this,event)" onmouseover="AW(this,event)" onmouseout="AW(this,event)"></span></span>

Not the event handler, the first try was simply event.clientX, but I get and error and halt on IE and undefined on FF

I’m stuck here, any clue?
Raul
Tuesday, April 25, 2006
Sorry for the messy duplication on my last post, Alex, do you have any idea on this.
Raul
Wednesday, April 26, 2006
I guess you should pass the native event object when you raise custom event -

...
indicator.setEvent("onmouseover", function(event){
        
this.raiseEvent("onCellIndicatorMouseOver"event);
});
...
 
Alex (ActiveWidgets)
Wednesday, April 26, 2006
Really appreciated Alex, it’s work just fine
Raul
Wednesday, April 26, 2006



This topic is archived.

Back to /grid.examples/indicator-template.html

Documentation:

Forum search