Hi,
I am calling a FreeMarker function from Javascript function.
function foo(param1,param2){
validation ………
txt = "${report("${param1!'NA'}",param2)}";
document.write(txt);
}
<#function report paramX paramY>
<#assign txt="">
<#assign txt=txt+paramX>
MY CODE ……………………….
<#return (txt)>
</#function>
The out put on the page is "NA".
If the code in JavaScript is changed from "${report("${param1!'NA'}",param2)}"; to "${report("param1",param2)}";
The out put on the page is param1 (and not the value contained in param1).
What is the problem? How can I pass the JavaScript variable to the function in FreeMarker? Where am I going wrong?