ListBox contents W/O Selecting

Results 1 to 2 of 2

Thread: ListBox contents W/O Selecting

  1. #1
    Faris Guest

    Default ListBox contents W/O Selecting

    Hi, I have an ASP page with a listbox which when user posts the page I want to access all values in the list box but WITHOUT selecting them how can this be done ?

  2. #2
    Join Date
    Dec 1969

    Default RE: ListBox contents W/O Selecting

    This is a solution I have used on IE4:<BR>&#060;input type="button" name="Apply" value="Apply" onclick="submitItems()"&#062;<BR><BR>function submitItems() {<BR> // select all items, then submit<BR> document.myForm.list2.options.multiple = true // set for multiple select<BR><BR> for(i=0;i&#060;document.myForm.list2.options.lengt h;i++) {<BR> document.myForm.list2.options[i].selected = true // set all selected<BR> }<BR> document.forms[0].submit() // need ordinal, not form name<BR>}

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts