Hi Mark,
Actually you can access this variable within Javascript in the following
manner:
function chgablacted() {
box = regs['myselect[]'];
value = box.options[box.selectedIndex].value;
if (value == 'some value') {
...
} else {
...
}
}
The name of the variable will include the brackets [].
sunil.
mslemko wrote:
Thanks Warren,
This works!
The side effect that is -somewhat- undesirable is that it becomes
incompatible accessing the field with Javascript. Perhaps there is a
way to get around that problem though.
-Mark
Warren Vail wrote:
Set the name of your field in html to be;
name="myselect[]"
that way when the form is returned to you each selected value is
returned to you, for example if you code
$choices = $_POST["myselect"];
choices will be an array containing the actual values selected when
the form is submitted.
hope this is what you were looking for.
Warren Vail
- clip -
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php