View Complete Thread | FoxWeb Forum Home
Date:    Msg ID:   
From:    Thread:   
Consider the following listbox:
Please select the options you would like:<br>
<select name="car_pref" size=4 multiple>
<option value="ac">Air Conditioning</option>
<option value="nav">GPS Navigation</option>
<option value="4x4">4-wheel drive</option>
<option value="cd">CD player</option>

The above code would display the following listbox:

Please select the options you would like:

In order to read the results of the above form, you could use something like the following, which simply sends the selected values back to the browser.  Obviously your code would do something more useful with the values:

FOR i = 1 TO Request.FormCount("car_pref")
Response.Write(Request.Form("car_pref", i)

Alternatively, you can make a call to Request.FormArray(aPreferences, "car_pref"), which will populate the array aPreferences with all customer selections.

FoxWeb Support Team

Sent by Nancy Remillard on 05/10/2002 07:01:48 PM:
I am trying to capture multiple selections from a list box on a web page.  I populated the list with values from a table in FoxPro.  Using Java Script, I have been able to get the values into an alert on the web side, but can't seem to pass the value back to my .prg so it can store it.  I don't have any problems when I only allow the viewer to make one selection.  Any pointers will be greatly appreciated.
After reading many of the posts here, I would have to consider myself a be gentle!