I can't get it to work. How do I add JavaScript to a jQuery template?
I tried it in the following way without success:
<script id="geoShapeTooltip" type="text/x-jquery-tmpl">
${ alert ("TEXT"); }
<table id="tooltipTable" >
<tr><th class="tooltipHeading" colspan="2">
${item.fieldValues.NAME}, ${item.fieldValues.REGION}</th></tr>
<tr>
<td>Population:</td>
<td>${item.fieldValues.POP2005}</td>
</tr>
</table>
</script>
Here is my problem on fiddle.
edit: I found a different solution. In Infragistics templates you can execute javascript in if statements. {{if YOUR_JAVASCRIPT_GOES_HERE}}Some Text}}{{/if}} And if you want, you can add values to the parameter, to display them later. A little bit hacky, but works.