Results 1 to 4 of 4

Thread: Listbox

  1. #1
    Dilip Guest

    Default Listbox

    I have a listbox and "Save" button. When I click on Save button I need to check whether<BR>listbox has any values in it. How to get no. of options in the listbox.<BR><BR>document.frmselect.Listbox2.count doesn&#039;t work.<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Listbox

    why do u need to know the count, anything specific u want to do with the count because otherwise u can simply check the values in request.form("selectboxname"), this will give a comma separated value of all the options selected.

  3. #3
    Dilip Guest

    Default RE: Listbox

    I&#039;m performing following function when we click "Save" button.<BR><BR>document.frmselect.action = "replaceowner.asp?owner=" + document.frmselect.Listbox2.options[0].value;<BR> document.frmselect.ownername.value = document.frmselect.Listbox2.options[0].text;<BR> document.frmselect.submit();<BR><BR>If there are not records in listbox it is giving error:<BR> lue is not object.

  4. #4
    Dilip Guest

    Default RE: Listbox

    I got it..<BR>listbox.length <BR>Thanks

Posting Permissions

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