Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Nishan on May 18, 2009 11:26
open dhtmlx forum
dhtmlxgrid cell type 'link' : onclick javascript function

Hi,

Is there a way to specify an onclick javascript function to the link when I have the cell type as 'link' ?

Thanks,
Nishan
Answer posted by Alex (support) on May 18, 2009 23:06

Hello, 

You can try to use something similar to the next (function call instead of url):

<cell>Link Title^javascript:someFunction()</cell>

Answer posted by Nishan on May 18, 2009 23:57
Hi,

actually I need to specify a link in href and also an onclick.

Any pointers ?

Thanks,
Nishan

Answer posted by Nishan on May 18, 2009 23:59
Hi,

I changed the dhtmlxgrid_excell_link.js to include onclick js function as well.

Now I can specify the onclick function as the last field in '^' delimited string.
Attaching file, please review.

Thanks,
Nishan

Attachments (1)
Answer posted by Support on May 19, 2009 06:27
Code modification will not cause any side effects and will work correctly as expected. 
By the way, package contains "sources" folder with not-compressed code, which is more suitable for modification than compressed one.