Try this piece of code.........................
function selectAll()
{
for ( i = 0; i < document.page.listbox.length;i++)
document.page.listbox.options[i].selected = true;
return true;
}
where page is your page and listbox is the listbox on that page.
Sushovan.
"peter cheung" <[EMAIL PROTECTED]> wrote:
>
>I did not see any response and I am trying to give you some info.
>
>1. If the listbox is populated by javascript at the client side there is no way you
>can get the complete list.
>You can only get what the user selected.
>The browser will not send the complete list back to the web server.
>2. you said the original data is from a database. Why not get the info from the
>database. Or when you get it from the database save it to a seesion object.
>
>
>
>
>"Fahmida Rashid" <[EMAIL PROTECTED]> wrote:
>>
>>Hello people,
>>I am at my wits' end trying to figure this one out. Any help will be appreciated.
>>
>>I am obtaining values for a listbox from the database and JavaScript populates it.
>>When the user clicks on any of the values, I want to select all items and insert
>>the values back in to the database.
>>
>>I tried selectAll(), and then using getSelectedList() to pass the values to a
>vector, but
>>the vector is getting only the value of the item that the user had selected.
>>
>>Someone posted a JavaScript here on selecting all checkboxes which I tried modifying
>>for this listbox, but I am still getting only that item that the user selected.
>>
>>Any suggestions are welcome
>>TIA
>>Fahmida
>>
>
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]