Foren
Onchange event on a dropdown list
Venkat Kumar, geändert vor 15 Jahren.
Onchange event on a dropdown list
New Member Beiträge: 9 Beitrittsdatum: 10.04.08 Neueste Beiträge
Hi All,
i am new to liferay.
I have a dropdown menu contains all the oraganizations in the system.
one more dropdown is there for users.
i want select an organization in the fisrt dropdown list,then all the users in that organization will come in second dropdowm list.
Any help.
Thanks in adavance.
Venkat
i am new to liferay.
I have a dropdown menu contains all the oraganizations in the system.
one more dropdown is there for users.
i want select an organization in the fisrt dropdown list,then all the users in that organization will come in second dropdowm list.
Any help.
Thanks in adavance.
Venkat
Zankar Shah, geändert vor 15 Jahren.
RE: Onchange event on a dropdown list
Regular Member Beiträge: 106 Beitrittsdatum: 03.10.07 Neueste Beiträge
Hi,
In order to get the first drop down, u can use the existing liferay method
OrganizationLocalServiceUtil.search
Then after some one select any organization from first drop down, post again and get the users for that organization using
UserLocalServiceUtil.search method
Thanks
Zankar
In order to get the first drop down, u can use the existing liferay method
OrganizationLocalServiceUtil.search
Then after some one select any organization from first drop down, post again and get the users for that organization using
UserLocalServiceUtil.search method
Thanks
Zankar
Venkat Kumar, geändert vor 15 Jahren.
RE: Onchange event on a dropdown list
New Member Beiträge: 9 Beitrittsdatum: 10.04.08 Neueste Beiträge
Thanks for reply.
Is there any mechanism without submitting the form can we get the second list to be populated by using ajax or can we able to call Java method from javascript.
Thanks
Venkat
Is there any mechanism without submitting the form can we get the second list to be populated by using ajax or can we able to call Java method from javascript.
Thanks
Venkat
Zankar Shah, geändert vor 15 Jahren.
RE: Onchange event on a dropdown list
Regular Member Beiträge: 106 Beitrittsdatum: 03.10.07 Neueste Beiträge
Ya sure we can use doing ajax in liferay. Liferay provides AjaxUtil for doing all kind of partial submit and other feature. check the following example code
var message = Liferay.Popup(
{
width: 350,
height: 300,
modal: true,
title: "Share"
});
url = "ur post url";
AjaxUtil.update(url, message, {onComplete: function() {Liferay.Popup.center()}});
var message = Liferay.Popup(
{
width: 350,
height: 300,
modal: true,
title: "Share"
});
url = "ur post url";
AjaxUtil.update(url, message, {onComplete: function() {Liferay.Popup.center()}});
chandra sekhar, geändert vor 14 Jahren.
RE: Onchange event on a dropdown list
Regular Member Beiträge: 149 Beitrittsdatum: 07.07.09 Neueste Beiträge
Hi Zankar Shah ,
Can you expain in detail about how to populate dropdown from selection of another dropdown list using ajax.
Thanks in advance.
Regads,
chandra sekhar
Can you expain in detail about how to populate dropdown from selection of another dropdown list using ajax.
Thanks in advance.
Regads,
chandra sekhar
Nagaraju Uppalapati, geändert vor 8 Jahren.
RE: Onchange event on a dropdown list
New Member Beiträge: 24 Beitrittsdatum: 29.06.15 Neueste Beiträge
Could you please provide the solution for this.