留言板

Reading portal.properties using Java Script

thumbnail
Udaya Ramakrishnan,修改在12 年前。

Reading portal.properties using Java Script

Junior Member 帖子: 67 加入日期: 11-9-7 最近的帖子
hi all,

I am trying to fasten the upload process of portrait image for my application.
i am having a set of properties written in portal.properties.
i have to read this properties values using Java Script.
i cant use the function PropsUtil.get() in my Java Script.
Can anyone help me how this can be done?

Thanks
Udaya.R
thumbnail
Pankaj Kathiriya,修改在12 年前。

RE: Reading portal.properties using Java Script

Liferay Master 帖子: 722 加入日期: 10-8-5 最近的帖子
Hi RamaKrishna,
You can set value of property in input hidden field in jsp like
/*
<input type="hidden" id="property1" value="<%=PropsUtil.get("property1")%>"/>
*/
and you can get this property value in javascript easily by

document.getElementById("property1").value

HTH,
Thanks,
Pankaj
thumbnail
Nagendra Kumar Busam,修改在12 年前。

RE: Reading portal.properties using Java Script

Liferay Master 帖子: 678 加入日期: 09-7-7 最近的帖子
What is version of Liferay you are using? Is it a plugin portlet?