Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: <portlet:namespace/> is not resolving with current portlet name?
Hi,
I am including js file in portlet class as "com.liferay.portlet.footer-portlet-javascript=/js/main.js" , In main.js i have written some functions,
ex
function test(){
var ab=document.getElementById("<portlet:namespace/>element1").value;
}
<portlet:namespace/> is not resolving with the current portlet name and converting as
var ab= document.getElementById("\x3cportlet:namespace/\x3eelement1").value;
All your feedback is highly appreciated .
You can't use tag libraries in plain Javascript files. Tag libraries only work in JSPs and Freemarker templates.Surendra K:function test(){ var ab=document.getElementById("<portlet:namespace/>element1").value; }
Thank you Minhchau
Dang for your response.