Call function for tooltip onmouseover

Trying to determine if we should buy this...

I'm new to javascript and am trying to use a function to display a tooltip on one specific column (use the function now in HTML tables). I think I can use non-displayed columns for the parms to pass my function, but cannot figure out exactly what to set and how to set it in the AW grid properties to get there.

Can anyone offer some assistance?

Other than this last issue I think we could make use of AW.

Brian Crandall
March 25,
The third example on this page http://www.activewidgets.com/aw.ui.grid/cell-tooltip.html shows you how to use tooltips with a function. The function takes the column and row as arguments. If you are using a JavaScript array as your data source, it shouldn't be difficult to access the array element given the column and row.
March 26,
Anthony - thank you.

Using a code snippet from an earlier post from Alex:

obj.onCellMouseOver = function(event, col, row){
window.status = [col, row];

I came up with the folowing:

grid.onCellMouseOver = function(event, col, row){if (col == 14) {Tip('Text goes here (column 23)', TITLE, 'This is the Title (column 14)', WIDTH, 300)}};

grid.onCellMouseOut = function(event, col, row){if (col == 14) {UnTip()}};

However, I am still having problems trying to figure uot how to get my data values (in array myData) in place of my hard-coded text.

I have tried
{return myData[row][23]}
{return this.getCellText(23,row)}
but both give javascripting errors.

I appreciate any help you can offer.
Brian Crandall (an old dog trying to learn at least one new trick!)
March 26,
I have resolved this issue.

I created a function to return the text of the cell from my data array:

function GetTipText(row, col) {return myData[row][col];}

then changed the hardcoded text 'Text goes here' to the function call:

grid.onCellMouseOver = <cfoutput>function(event, col, row){if (col == #column_for_tooltip#) {Tip(GetTipText(row, #tooltip_text_column#), TITLE, GetTipTitle(row, #tooltip_title_column#), WIDTH, 300)}};</cfoutput>

(The cfoutput's are ColdFusion tags. text between #'s are variable names).

Brian Crandall
March 26,

This topic is archived.

See also:

Back to support forum