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: Liferay.Util.addParams - More than one parameter
This is my code right now:
function downloadFile(fileIdValue)
{
var downloadResUrl = '<portlet:resourceURL></portlet:resourceURL>';
location = Liferay.Util.addParams("fileId="+fileIdValue, downloadResUrl);
return false;
}
How i can add another parameter?
I've searched some example but i did not find anything.
Thanks,
Manuel
Hi,
You can try below way, adding param to updated URL.
function downloadFile(fileIdValue1, fileIdValue2)
{
var downloadResUrl = '<portlet:resourceURL></portlet:resourceURL>';
downloadResUrl = Liferay.Util.addParams("param1="+fileIdValue1, downloadResUrl);
downloadResUrl = Liferay.Util.addParams("param2="+fileIdValue2, downloadResUrl);
location = downloadResUrl ;
return false;
}
Thanks, it work =)
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™