3.0.5

handling right click in link in grid cell.

I currently have an ActiveWidgets app where I have hyperlinks in grid cells:

var celllink = new AW.Templates.Link;
celllink.setAttribute("target", "_new");
grid_obj.setCellTemplate(celllink, i);
grid_obj.setCellLink(function(c, r){ return "proc.cgi?val=" + grid_obj.getCellValue(c,r); }, i);

So if the user clicks the link in a cell it will take them to proc.cgi?val=VAL where VAL is the contents of that grid cell (and this will open up in a new browser tab).

What I'd like to do now is, in addition, also allow users to rightclick on the link to do a different action (in this case, I want to open up a floating, draggable div popup window --- I'm using this library: http://www.dynamicdrive.com/dynamicindex11/abox2.htm --- which will give them further options). But I still want to maintain the same behavior if they click normally (i.e. left click). In other words, I want to support different actions depending on whether they left click or right click the link. I'm not sure how to do this and hopefully someone can help. Thanks.

-Andrew
AKS
March 30,

This topic is archived.

See also:


Back to support forum