struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Hill" <andrew.david.h...@gridnode.com>
Subject RE: All values of html:select
Date Thu, 16 Jan 2003 06:11:00 GMT
Yes you will need javascript.
You might not need a hidden field though.
In my app I have to do this too - as all my submits go through a javascript
method anyhow it wasnt to hard for me call a function that searches the dom
(be careful of cross-browser support here) for selects with this requirement
and selects all their contents just before the submission.
If you implement an onSubmit handler you might be able to do the same thing.
Failing that a hidden field thats always kept up to date could also do the
trick. I don't think you can hide selects (in a NS6 compatible way) though.
If your using the hidden field technique then you may need to submit as a
single concatenated string and break it up again on the server side.

-----Original Message-----
From: Suresh Addagalla [mailto:suresh.addagalla@wipro.com]
Sent: Thursday, 16 January 2003 13:57
To: struts-user@jakarta.apache.org
Subject: All values of html:select


Hi,

I need to display a set of values in an html:select control. User
adds/deletes certain values, so at the end I need to get the list of
"all" values in the combo box, not just the selected value(s). How can I
achieve this? Do I need to use JavaScript (and a hidden variable to
store all the values) or does the framework provide some built-in
support?

Thanks,
Suresh



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message