Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2005

Tip: Looking for answers? Try searching our database.

Pass mulitple select options using GET

Thread view: 
puneet.bansal@wipro.com - 08 Jun 2005 22:10 GMT
Hi,

I have a 'multiple select' in a form in an HTML page and I am trying to
send the selected values to the server using GET method eg

ProcessXXXServlet?selectOptions=document.forms[0].selectBoxName.value

I get only the first selected value on the server when I try to
retrieve the selected options by

request.getParameterValues("selectOptions")

How can I get all the selected values on the server. For some reason, I
have to append the parameter to the URL and cannot use post method.

Thanks.
Puneet
puneet.bansal@wipro.com - 08 Jun 2005 22:16 GMT
Actually, I am not submitting the form, but just opening a new window
using window.open() method.

Puneet
Lucy - 08 Jun 2005 22:25 GMT
> Actually, I am not submitting the form, but just opening a new window
> using window.open() method.

JavaScript?
puneet.bansal@wipro.com - 08 Jun 2005 22:33 GMT
I am trying to use the following

window.open('ProcessXXXServlet?brand='+document.forms[0].brand.values);

where 'brand' is a multiple select. But using this I get only first
value of brand on the server, not all the ones that user selected in
the multiple select
Owen Jacobson - 09 Jun 2005 06:15 GMT
On Wed, 08 Jun 2005 14:33:02 -0700, puneet.bansal wrote:

> I am trying to use the following
>
[quoted text clipped - 3 lines]
> of brand on the server, not all the ones that user selected in the
> multiple select

Her question, I believe, was "is this Javascript, or Java?".  If it's
JavaScript, you put it between <script> tags or in onClick/onWhatever
actions in an HTML document (among other things) and is _OFF TOPIC_ here.
If it's Java, you'll have to give us the declarations of the variables
'window' and 'document' before we can make sense of that.

(If it's Java, your quoting's wrong, anyways; I'm sure you're using
javascript, in which case you should take your question to an appropriate
newsgroup.  comp.lang.javascript, probably.)
Andrew Thompson - 08 Jun 2005 22:34 GMT
> I have a 'multiple select' in a form in an HTML page and I am trying to
> send the selected values to the server using GET method eg
>
> ProcessXXXServlet?selectOptions=document.forms[0].selectBoxName.value
>
> I get only the first selected value on the server ...

Sounds like (yet another) job for the JS gurus.  Start here.
<http://groups.google.com.au/group/comp.lang.javascript/msg/cc6612f886cf138c>

HTH

Signature

Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.LensEscapes.com/  Images that escape the mundane



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.