?
Solved

Selecting a value for a combobox

Posted on 2012-08-28
2
Medium Priority
?
450 Views
Last Modified: 2012-08-28
Hi,

I am trying to select the vaue of a combobox based on what's in the database, but it does not select it:

<select name="MemberType" id="MemberType" value = "
<%
      if ElAp = "AP" then response.write("Appointed")
      if ElAp = "EL" then response.write("Elected")
%>">
  <option>Appointed</option>
  <option>Elected</option>
  <option>Coach</option>
</select>

Any ideas?
0
Comment
Question by:prosit
2 Comments
 
LVL 54

Accepted Solution

by:
Scott Fell,  EE MVE earned 2000 total points
ID: 38343059
It's going to look more like this

<option <%if ElAp="AP" then response.write "selected" end if >Appointed</option>
<option <%if ElAp="EL" then response.write "selected" end if >Elected</option>
<option <%if ElAp="CO" then response.write "selected" end if >Coach</option>
0
 
LVL 2

Author Closing Comment

by:prosit
ID: 38343077
Here's the correct syntax, but thanks, got me all fixed!!!

<select name="MemberType" id="MemberType">
<option <%if ElAp="AP" then response.write("selected") end if %>>Appointed</option>
<option <%if ElAp="EL" then response.write("selected") end if %>>Elected</option>
<option <%if ElAp="CO" then response.write("selected") end if %>>Coach</option>
</select>
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question