473,437 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,437 software developers and data experts.

How to get listbox values in servlet

Hi all,
Please help me,
can any one tell me how to get list box values in servlet.
i have used :
Expand|Select|Wrap|Line Numbers
  1. <Select name="lstProjectmem" size="5" class="txbEnabledText" multiple="multiple" onChange="javascript  isplay(this)"/ >
  2. <option selected>..........PROJECT MEMBERS..........</option> </select>
  3.  
and in servlet i wrote,
Expand|Select|Wrap|Line Numbers
  1. String prjmem[] = request.getParameterValues("lstProjectmem");
to get list box values, but i am unable to get the values.
Please help me ...
thank you in advance!
Oct 8 '08 #1
2 9401
acoder
16,027 Expert Mod 8TB
This is a Java problem, so I've moved this thread for you to the Java forum. Please ensure all threads are posted in the most relevant forum. Thanks.

All I can say (not related to your problem though) is that in your onchange, you don't need "javascript" - just call the function.
Oct 8 '08 #2
r035198x
13,262 8TB
request.getParameterValues is the correct way of getting an array as a parameter in a servlet. Perhaps if you post the full select declaraction there might be something wrong with it. e.g Are you sure that select is on the form that is submitted to the servlet?
Oct 8 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Chris | last post by:
Hi, I have an application written in ASP and I am converting to ASP.NET in the old ASP page users can add items to a listbox control. When the user hits the "submit" command button on the...
7
by: yue | last post by:
Hi, How do I loop through listbox items? Thanks, yue
2
by: DC Gringo | last post by:
I have two listboxes, the first of which is an autopostback=true that allows multiple row selection. When I select multiple values (by holding down CTL) in the first one, it should query the...
7
by: technocraze | last post by:
Hi guys, I encountered this error while using the AfterUpdate event for my listbox. Error: Update or CancelUpdate without using AddNew or Edit. What i wanted to achieve is just to display the...
1
by: cpestrella | last post by:
Hello everyone! I need some help. I'm trying to create an SQL Insert statement in VB and I need to pass the value of the listbox as fieldnames. It goes like this: sql = "Insert into TableName...
5
by: =?Utf-8?B?QmlnU2Ft?= | last post by:
I've a ListBox with the Selection Mode set to Multiple. I want to use the Selected values as the WHERE Parameters in a SQL Data Source. If I set the SQL Data Source to use the Selected Value of the...
17
by: SenileOwl | last post by:
I'm very new to the whole programming thing and I'm having a little trouble with the syntax of my code. My code contains a bound listbox where the display member and value member are two different...
1
by: MarkNicholson82 | last post by:
Hi I have a series of 3 listboxes. When a user selects one option from the first the second listbox could change depending onthe option selected in the first etc. Is there a way to check a...
2
by: alinagoo | last post by:
Hello all I'm working on a database application with MS-Access 2007 and now i have a problem with dynamic report creation process! I need to guess the data type of a ListBox! This my problem. The...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.