Testing ListBox Input

Results 1 to 4 of 4

Thread: Testing ListBox Input

  1. #1
    Didier Leber Guest

    Default Testing ListBox Input

    I created a page with data coming from a database and the user has to select from a list box a new status. Following the selection he must also supply additional information in a text box. At the end of my page I put a script to check the selection but impossible to retireve the value selected.<BR>I can perform this operation for any text box but impossible to find the correct property for the listbox.<BR><BR>Here my script :<BR><BR>Function FeedbackForm_OnSubmit()<BR>Dim SelectStatus<BR>FeedbackForm_OnSubmit = false<BR>Set theForm = Document.FeedbackForm<BR>SelectStatus = Trim(theForm.FSelStat.Value)<BR> If SelectStatus = "" then<BR> msgbox "Please mark at least one status.", vbQuestion, "Need Input"<BR> theForm.FSelStat.Focus<BR> else<BR> FeedbackForm_OnSubmit = true<BR> End If<BR>End Function<BR><BR>I have placed a msgbox before the if condition to check the variable. But no value stored in SelectStatus !<BR><BR>Thanks for helping me.<BR>Didier

  2. #2
    KPW Guest

    Default RE: Testing ListBox Input

    To retrieve the value of a list box, I think you need to do:<BR><BR>SelectStatus = Trim(theForm.FSelStat(theForm.FSelStat.selectedInd ex).Value)<BR><BR>HTH<BR><BR>

  3. #3
    Didier Guest

    Default RE: Testing ListBox Input

    I&#039m sorry but this code don&#039t help me more.<BR>I still get an empty variable result.

  4. #4
    Didier Leber Guest

    Default RE: Testing ListBox Input

    I have found the solution with help of your suggestion.<BR>In fact using SelectStatus = theForm.FSelStat.selectedIndex<BR>I can retrieved the values from my list box.<BR><BR>Thanks.<BR>Didier

Posting Permissions

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