tags:

views:

136

answers:

2

Hello.

I have 2 select, I want the second select list loads based on selected value of first select. In another word first select is a list of objects, those objects each has a list of another objects. so I want load second list based on selected object of first select. I know that can be done using JQuery, but can I do this without JavaScript/JQuery?

Thanks in advance.

+1  A: 

No, you can't do this without Javascript. With static HTML you can't achieve this effect; drop-down fields on HTML forms come pre-loaded with their options, and are independent of other fields on the form.

Todd Owen
Thanks. what about struts2 tags, I meant <s:select> tag of struts2. isn't this possible with struts2 tags?
imz
Struts2 tags are processed on the server, generating HTML. Ultimately what's sent to the browser is just HTML.
Todd Owen
+1  A: 

There is a tag that does this for you http://struts.apache.org/2.x/docs/doubleselect.html

Out of the box it probably uses Dojo API or uses a server side request to generate the second list. I have not used any of the JQuery UI in Struts.