473,397 Members | 2,033 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,397 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 9399
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.