Hi,
iam using the DHTMLX grid which has a column type as link.What i want to do is to call a javascript method onclick of that column value,which in turn opens a pop up window.
1.Can you please tell me how to invoke a javascript method onclick of that value
2.How to infer that in the XML(holds the content of the grid)
3.How to pass that link value to the same javascript method
With Regards,
Udaya.R
There are two way
a) encode action directly in link value
Label^javascript:myCustomCode(‘Label’)^_self
b) use onRowSelect method of grid ( basically it will be called on each click inside the grid )
Label
…
grid.attachEvent(“onRowSelect”,function(id,ind){
if (ind == index_of_link_column)
myCustomCode(id,ind); // by knowing ID and ind any info related to cell can be retrieved
return true;
})
I tried this method…but the thing is iam dynamically writing the XML from a java class,storing the entire data as a string and accessing that from a jsp.This is where iam initializing my grid and want to invoke a js method called
function openManageScreen(elem)
{alert(elem);}
Iam writing the XML as
100"^javascript:openManageScreen(‘100’)^self
Can you please guide me.
the error i get is teling like - openManageScreen is not defined
The correct XML would be
100"^javascript:openManageScreen(“100”)^_self
a) double quotes instead of single ones ( sorry for misleading example in original answer )
b) the _self instead of self