close the <option>. This works and the only difference is the closed
<option> tag.
<form>
<select multiple size=5 name=a>
<option value=1 selected>dog</option>
<option value=2>cat</option>
<option value=3 selected>fish</option>
</select>
</form>
HTH
Sam
----- Original Message -----
From: "Nicolas Verhaeghe" <[EMAIL PROTECTED]>
To: "ActiveServerPages" <[EMAIL PROTECTED]>
Sent: Monday, October 14, 2002 5:40 PM
Subject: Reselecting all selected choices in a multiple <select>
> This is more an HTML question, but some of you might have the answer.
>
> I protect my forms client-side and also server-side.
>
> By client-side I mean a javascript checking for most of the forgotten
> information, and server-side a more complex information verification
> routine which displays the form again in case of an error, and with
> error messages on top.
>
> The form shows the information which was previously entered, including
> selecting the correct choices in my <select> inputs.
>
> In case of a multiple select, what I do is split the response string for
> that variable, as multiple choices are returned in a comma-separated
> string of multiple values.
>
> My problem is that only the first element in the array will be selected:
>
> <select name="myVar" multiple size="3">
> <option value="1" selected>Choice 1
> <option value="2">Choice 2
> <option value="3" selected>Choice 3
> <option value="4">Choice 4
> <option value="5" selected>Choice 5
> </select>
>
> This should hightlight Choice 1, 3 and 5. But it does not ... Only
> Choice 1 is highlighted, while Request("myVar") was equal to "1, 3, 5".
>
> How can one preselect multiple choices in a <select ... Multiple ... >
> drop-down?
>
>
>
> ---
> You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
> To unsubscribe send a blank email to
%%email.unsub%%
>
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]