Hi
I need to refer to *all* the values of a combobox in one page across the
session.
i can get the selected value by Request.getParameter("comboname");
how can i refer to all the values?
Eg. I have
1 2
more values are added to the form dynamically
in get.jsp i want to be able to read
Why can you not use request.getParameter() in a declaration?
More specific, how are you supposed to write a method that can check the
values of a form input. Say I want a method called checkValues() that validates
the user input to the form, and outputs which fields are invalid.
Any hel
From: "Portal Team" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 03, 2000 10:09 AM
Subject: Request.getParameter() question
> Hi
>
> I need to refer to *all* the values of a combobox in one page across the
> session.
>
> i can get
>
> i can get the selected value by Request.getParameter("comboname");
>
> how can i refer to all the values?
>
.getParameterValues("comboname");
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Thanks for the reply , Liza
However,
>
>String[] theArray = Request.getParameter("comboname");
>
Request.getParameter("comboname"); returns only the selected value
Is there a way i could select all the values ( if cbbox is set to
multiselect) *through code*
Vineet
___
Thanks for the reply,
> > how can i refer to all the values?
> >
>.getParameterValues("comboname");
If none of the values in the combo box are selected, this returns null
<%=request.getParameterValues("cbyoursel")%> , is the code i tried for a
cbbox cbyoursel which is populated with values but
>
> Thanks for the reply,
>
> > > how can i refer to all the values?
> > >
> >.getParameterValues("comboname");
>
>
> If none of the values in the combo box are selected, this returns null
> <%=request.getParameterValues("cbyoursel")%> , is the code i tried for a
> cbbox cbyoursel which is populat
her.
Phil Campbell
-Original Message-
From: Portal Team <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Monday, April 03, 2000 8:18 AM
Subject: Request.getParameter() question
>Hi
>
>I need to refer to *all* the values of a combobox in o
thanks for the help everybody,
finally i looped through the combo, concatednated the values and passed
them by putting in a hidden input field. On the other side, i used the
string tokenizer to read the values and display accordingly
thanks again
Vineet
Thanks for the explanation Phil,
I managed to transfer the values of the combo to another jsp page.
>2.If you asking how to get all the possible items of a form list
>(myform.mycombo), from which a client may select, you will need to >read
>and parse the form... not the request.
that is one
> Request.getParameter("comboname"); returns only the selected value
>
> Is there a way i could select all the values ( if cbbox is set to
> multiselect) *through code*
>
As I said... use request.getParameterValues("comboname"), that returns an
array of values and should return all of the selected
If yoiu want your function to access request object you should pass it as a
parameter ...
Brian Slezak a écrit :
> Why can you not use request.getParameter() in a declaration?
>
> More specific, how are you supposed to write a method that can check the
> values of a form input. Say
hehe..javascritpt?
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/j
TED]>
-Original Message-
From: Brian Slezak [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 28, 2000 8:36 AM
To: [EMAIL PROTECTED]
Subject: request.getParameter() question.
Why can you not use request.getParameter() in a declaration?
More specific, how are you supposed to write a
14 matches
Mail list logo