Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi all, I have a drop down list

Status
Not open for further replies.

garfield11

IS-IT--Management
Jul 4, 2002
44
SG
Hi all,

I have a drop down list with multiple selection. Let say I selected John,Mary and Johnny and saves into a database. When I click the edit button, how can I make the selected items highlighted?

Example:

Consultant Name: John <-- highlighted
Jane
Mary <-- highlighted
Johnny <-- highlighted
Alan

Thanks.

Love_Garfield
 
Do you wanna use JS for the scripting?? It might be easier if you used VBScript, or ASP or SQL (in conjunction with coldfusion)... I have not failed; I have merely found 100,000 different ways of not succeding...
 
Hi,

Thanks for your reply.

I currently using VBScript.

Here are my code:

<TR><TD valign=&quot;top&quot;>Consultant Name :</TD>
<TD valign=&quot;top&quot;><SELECT name=&quot;Consultant_ID&quot;>
<% While Not objRS3.EOF %>
<OPTION Value=&quot;<%= objRS3(&quot;Consultant_ID&quot;) %>&quot;
<% If edit <> -1 Then
If objRS3(&quot;Consultant_ID&quot;) = objRS(&quot;Consultant_ID&quot;) Then
Response.Write &quot; SELECTED &quot;
End If
End If %> ><%= objRS3(&quot;ConsultantName&quot;) %></OPTION>
<%
objRS3.MoveNext
Wend %>
</SELECT></TD></TR>

But this only works when I selected 1 item but not more than 1.

Any idea how can I go about doing so??

Thanks!

Love_Garfield
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top