留言板

Dynamically create <aui:option and populate second drop down box

Ketan Solanki,修改在6 年前。

Dynamically create <aui:option and populate second drop down box

Junior Member 帖子: 63 加入日期: 14-5-28 最近的帖子
Hi,

I have to implement 2 level drop down boxes. Values of the second drop down depends on the value of the first drop down.

For this, I have my infra ready, like serveResource method will serve the list of values to be populated in second drop down on change of first drop down.

Now I want to set those values in second drop down by creating new list of <aui:option> objects and assigning them to second drop down box (and destroying already existing one, if any).

I have checked dynamic dropdownlist alloyui but it goes through <c:forEach> and it will take a page refresh each time, I don't want page refresh when the value changes in first level drop down.

e.g. javascript: dynamic drop down menu values which is using jquery and creating option object runtime and I am sure this won't take a page refresh.

Can someone please suggest if this is possible in AlloyUI?

Thanks & Regards,
Ketan
Ketan Solanki,修改在6 年前。

RE: Dynamically create <aui:option and populate second drop down box (答复)

Junior Member 帖子: 63 加入日期: 14-5-28 最近的帖子
Found the answer here.

How to Populate 2nd dropdown based on first dropdown

I would like to keep this question because of the title which is more obvious and people would search by this title more often. Google also has already indexed and hence easy to find emoticon