AnsweredAssumed Answered

additional function in infotemplate hyperlink

Question asked by pacofa on Jul 15, 2015
Latest reply on Aug 21, 2015 by Linn_GIS

Can anyone share an example of firing an additional function inside an onClick of a hyperlink inside an InfoTemplate?



I already have the InfoTemplate setup, and the hyperlink in place and working, but I would like to fire an additional function when the hyperlink is clicked.



I attempted inserting an onClick event in the anchor tag, as shown below, but I got an error saying the function I referred to was undefined.  I had a feeling that would not work, but I'm not quite sure how to do it.



var template = new InfoTemplate(result.layerName + "<br/><a href='http://myserver/street_view.htm' onClick='create_child();' target=_blank>Street View</a></br>");



Any help is apprecited... thanks!