struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nimish Chourey , Tidel Park - Chennai" <>
Subject RE: dynamically populating options in form
Date Thu, 06 Nov 2003 12:12:41 GMT
Something like Below ..

The "Onchange" event will trigger the Submission to another action which
then keeps the collection in request/session scope and select Box B is then
populated ..See the code below ..

		function callAction(){
			document.forms[0].action =

		<html:select property="A" onchange="callAction();">
			<html:options collection="collection1" name="Form"
property="value" labelProperty="label" />

		<html:select property="B" >
			<html:options collection="collection.areas"
name="Form"  property="value" labelProperty="label" />

-----Original Message-----
From: Andrew Hill [] 
Sent: Thursday, November 06, 2003 4:39 PM
To: Struts Users Mailing List
Subject: RE: dynamically populating options in form

Well at the least you would probably want to use some javascript to trigger
the submission of the form onchange of the first select so that you can
populate the second select based on the first's value over on the server
side and then redisplay the form.

To do it without any javascript you would need to use a second submit button
to do this, which the user would need to click after having entered a value
in the first field.

-----Original Message-----
From: Anindito De []
Sent: Thursday, 6 November 2003 19:00
Subject: dynamically populating options in form


We have two select boxes in an HTML form. Based on the option that the user
selects in the first box and some other considerations, the contents in the
second box get populated. Are there any reasonable means of doing this in
struts with minimal use of JavaScript ?

Thanks in advance

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message