Advertisement

11.21.2008 at 06:16AM PST, ID: 23925006
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.0

I am populating a Drop Down list Using asp

Asked by thomashospital in VB Script, Active Server Pages (ASP), Macromedia Dreamweaver

Tags:

I am trying to populate a Drop Down List from a table that I am already populatiing into a table.  My code works fine populating the table but when I added code to populate the List, it does not work.  It acts like it is stopping at the list and doing nothing.  Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="########" -->
 
<%
Dim rsphonedir__MMColParam
rsphonedir__MMColParam = "1"
if (Request.QueryString("keyword") <> "") then rsphonedir__MMColParam = Request.QueryString("keyword")
%>
 
<%
set news = Server.CreateObject("ADODB.Recordset")
news.ActiveConnection = adoCon
news.Source = "SELECT * FROM Provider WHERE Name Like '%" + Replace(rsphonedir__MMColParam, "'", "''") + "%' ORDER BY Specialty"
news.CursorType = 0
news.CursorLocation = 2
news.LockType = 3
news.Open()
news_numRows = 0
%>
 
<%
Dim Repeat1__numRows
Repeat1__numRows = 10
Dim Repeat1__index
Repeat1__index = 0
news_numRows = news_numRows + Repeat1__numRows
%>
 
 
************This is the code in my body of my page***************
 <p><span class="bodyheader"><strong> Physician Directory</strong></span></p>
      <p>&nbsp;</p>
      <form name="form1" method="Get" action="pv_PhysicianDirectoryTest - copy.asp">
        <label><span class="greentd">Search by Dr. Name</span>
          <input name="keyword" type="text" id="keyword">
          </label>
        <span class="greentd">Search By Specialty</span>
 
*********This starts the code that bombs with no errors just does nothing after I added it *******************************       
        <select name="Spec" size="1" id="SpecList">
        <%
               do while not News.EOF
               if Request.Form("SpecList") = News("Specialty") then
               Response.Write "<OPTION VALUE = '" & News ("Specialty") & "' SELECTED>"
               Response.Write News("Specialty") & "</Option>"
              News.MoveNext
       else
                Response.Write "<OPTION VALUE = '" & News ("provider") & "'>"
                Response.Write News("Specialty") & "</Option>"
                 News.MoveNext
                 end if
             loop
        %>
</SELECT
 
********Everything below works fine until I added the above code**************                        
</select>
        <p class="greentd"><label></label>
        </p>
      </form>
      <p class="news">
        <label></label>
      </p>
      <table width="100%" border="0" cellpadding="5" cellspacing="0" bordercolor="#072B58" bgcolor="#FAFAFA">
        <tr>
          <th width="140" height="23" valign="top"><p align="center"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Name<br>
          </strong></font></p></th>
          <th width="190" valign="top"><div align="center"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Address<br>
          </strong></font></div></th>
          <th width="117" valign="top"><strong><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif">Specialty</font></strong></th>
          <th width="109" valign="top"><strong><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif">Phone Number</font></strong></th>
        </tr>
      </table>
      <p>      </p>
      <% 
					While ((Repeat1__numRows <> 0) AND (NOT news.EOF)) 
					%>
          <table width="99%" height="15" border="1" cellspacing="0">
        <tr> 
          <td width="26%" height="10"><div align="left"><font color="#FFFFFF" size="1">a</font><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><%=(news.Fields.Item("Name").Value)%></font></div></td>
          <td width="34%" height="10"><div align="left"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><%=(news.Fields.Item("Office1Address").Value)%>, <%=(news.Fields.Item("Office1AddressState").Value)%>&nbsp<%=(news.Fields.Item("Office1AddressZip").Value)%> </font></div></td>
          <td width="21%" height="10"><div align="left"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><%=(news.Fields.Item("Specialty").Value)%></font></div></td>
          <td width="19%" height="10"><div align="left"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif"><%=(news.Fields.Item("Office1AddressTelephone").Value)%></font></div></td>
        </tr>
      </table>
      <% 
					Repeat1__index=Repeat1__index+1
					Repeat1__numRows=Repeat1__numRows-1
					news.MoveNext()
					Wend
					%>
[+][-]11.21.2008 at 01:44PM PST, ID: 23017413

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.24.2008 at 06:26AM PST, ID: 23028110

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.24.2008 at 12:04PM PST, ID: 23030084

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: VB Script, Active Server Pages (ASP), Macromedia Dreamweaver
Tags: ASP
Sign Up Now!
Solution Provided By: thomashospital
Participating Experts: 1
Solution Grade: A
 
 
[+][-]12.30.2008 at 07:35PM PST, ID: 23267928

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 - Hierarchy / EE_QW_3_20080625