English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i have 2 ASP ListBoxes and i need to move the selected item from list A to List B whaen i click the button x,
the prblem that i need to do that within the java script
(no post back to the page) the list must be ASP Component,
if you know the answer that meen you r the greatest person in the universe :D
Regard's

2006-08-03 01:25:19 · 1 answers · asked by Anonymous in Computers & Internet Programming & Design

1 answers

From what you had given, I guess the ASP Listboxes are rendered by the Server while creating the page. Thinking ahead in these lines, you can do it without posting the page back to server.

While constructing the list boxes itself in server code, build the script that will add all list elements of List A into one variable separated by a delimiter like comma. Declare a global return value variable. Using Javascript, catch button click event handler. In that event handler, i) get the value from first list, ii) look for that value in first variable iii) store it in global return value variable iv) delete that selected value in list a variable v) when done using a hidden filed, set the value of hidden field to global return variable and submit your page.

2006-08-03 02:07:41 · answer #1 · answered by Indian_Male 4 · 0 0

fedest.com, questions and answers