Value from Grails controller breaking javascript in gsp
I am passing XML string from grails controller to gsp and need to use it
in the javascript function.
My controller code is
render(view: "list",model: [dataXML: callXML.getXmlString()])
The javascript function in gsp code is
function parseXML(){
alert("in parseXML");
xmlStr = "${dataXML}";
}
As soon as the ${dataXML} comes in function it breaks the code. I tried
without quotes, still same problem. What is that I am doing wrong?
Thanks in advance.
No comments:
Post a Comment