473,769 Members | 7,315 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

add/remove with javascript for listboxes

hi ,
i have 2 listbox and 2 buttons like add and remove, both listbox have
multiple selection true so that i can either add or remove multiple selected
items. the first listbox is populated with sql server table during page load
time and the second one is empty, now i want if a user select item/s in first
listbox then it should add in another listbox after clicking add withour
postback using javascript and the item's text which is displayed in another
listbox after clicking add botton should send there values(not text) to
database table so that they also add in database. abd also if user select
item/s in second listbox then it should be removed after clikcing remove
button and the values also should hget removed from databass table also..
plz help i need that no postback should happen and javascript should be used
here... thanks in advance ............... ............... ............... .
Nov 19 '05 #1
1 5879
deepak,

Please don't post the same question with different subjects.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=============== ======

"deepak" <de****@discuss ions.microsoft. com> wrote in message
news:84******** *************** ***********@mic rosoft.com...
hi ,
i have 2 listbox and 2 buttons like add and remove, both listbox have
multiple selection true so that i can either add or remove multiple
selected
items. the first listbox is populated with sql server table during page
load
time and the second one is empty, now i want if a user select item/s in
first
listbox then it should add in another listbox after clicking add withour
postback using javascript and the item's text which is displayed in
another
listbox after clicking add botton should send there values(not text) to
database table so that they also add in database. abd also if user select
item/s in second listbox then it should be removed after clikcing remove
button and the values also should hget removed from databass table also..
plz help i need that no postback should happen and javascript should be
used
here... thanks in advance ............... ............... ............... .

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1915
by: bill yeager | last post by:
I have several template columns inside of a datagrid. Inside of these template columns are databound listboxes: <asp:TemplateColumn HeaderText="Crew Chiefs"> <ItemTemplate> <asp:listbox AutoPostBack="False" BackColor="#ffffff" id="lstCrewChief" runat="server" Rows="1" DataSource="<%# DsCrewChief1 %>" Enabled="True"
0
1101
by: Terry D | last post by:
I'm having an issue with an ASP.NET page (VS.NET 2003, VB.NET, Oracle back end). The page uses the standard VS.NET grid to display the records from a particular table. The user can edit certain fields in the grid. There are 10 columns in the grid, 5 static fields (labels), 4 listboxes, and 1 edit box. 2 of the listboxes hold about 12 items each and the other 2 listboxes only contain 2 items. The problem is that on some lower end...
4
11497
by: Ron | last post by:
I've got a listbox that holds a list of groups. Users can select a group, hit the remove button and the group should be removed from the listbox. The only problem is that no matter which group you select, the first one in the listbox is always removed.(The listitem with an index of 0. Box is set to single selection mode) I've looked at multiple examples and they all do it this way. What's wrong? (variables are also being set to the values...
0
1586
by: Luis Esteban Valencia | last post by:
have a problem and I'm not sure how to handle/fix it. I have three listboxes on my page. The first listbox has a list of software products. When you select an item in the Products listbox, then the two other listboxes fill up with choices, one has related versions of that product, and the other has related Categories. Pretty typical stuff. Anyway, when I first designed the page, I used ASP.NET code to fill the values of the Version and...
0
1470
by: deepak | last post by:
i have set multiple selection property in bith listboxes(html control) to true. i have taken 2 buttons(html control) say Button1,Button2.now i want to add mutiple selected items to another listbox after clicking button1, and similray remvoing the mutiple selected ite,s from, another after clicking button2 ,, how can i do this ,, my script is given belo...
3
3812
by: Scott324 | last post by:
Need some help guys: I have two list boxes that I am moving LI's back and forth. I initially fill listboxA with a datareader. I move any/all/some/etc items from listboxA to listboxB. I then cannot loop through items in listboxB on the server. It acts as if the items were never really added even though I can access them through JavaScript. Both the listboxes are server controls. I am not reinitializing the
2
4351
by: salad | last post by:
This is a tip on how to speed up listboxes DRAMATICALLY. Persons that would benefit are those that are constantly updating the rowsource of a listbox/combobox in order to filter and sort the data and the refreshes are slow. (OT. I've often wondered why there is no .Sort or .Filter property for Combos and Listboxes.) My listboxes , and their rowsources, on my form were constantly being refreshed to filter and sort data. Ex:
9
9773
by: ramani253 | last post by:
Hai.i am new to javascript coding.i have two listboxes.when the user selects items in first listbox .it has to be removed from second listbox.if he unselects it has to be added again.please help me
7
14999
by: laks2886 | last post by:
can anybody tell me how do u validate a listbox to select atleast one item from it. I have a listbox within the template field of a grid view. and these listboxes can vary from 1 to 4. how can i know how many listboxes are present so that i can loop in javascript.
1
9998
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9865
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8876
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3967
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3567
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.