I have a freemarker macro like this.
<#assign xmlNode = parseXML("<field name='dropDown' type='select' valueName='COUNTRY'/>")>;
<#import "utilFields.ftl" as util />
<div>
<@util.createDropdown field=xmlNode/>
</div>
How would I call the same macro from Javascript?
Tried:
<#assign xmlNode = parseXML("<field name='dropDown' type='select' valueName='COUNTRY'/>")>;
<script type="text/javascript">
var dropdown = "${util.createDropdown(xmlNode)}";
alert(dropdown);
</script>
Error
FreeMarker template error:
A macro cannot be called in an expression.