If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > drop down list help?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-18-04, 23:50
zobernjik zobernjik is offline
Registered User
 
Join Date: Feb 2004
Location: Australia
Posts: 183
Talking drop down list help?

This is part of the code for a drop down list that displays data by headings and then it lists everything that belongs to that heading.

That all works fine, it displals propertly,etc, but I would like to make the heading bold to look like the following example, can that be done.



Week
Monday
Tuesday
Wednesday
Thurday



call Rec.Open("SELECT ProductID, Heading, ProductName,ProductCode FROM Shipment.dbo.Products " & _
" ORDER BY Heading, ProductName", Con)




szHeading = ""
nCount = 0
do while Rec.EOF = false
if ISNULL(Rec("Heading")) = false then
if szHeading <> CStr(Rec("Heading")) then
if nCount <> 0 then
Response.Write("<OPTION value=""-1""></OPTION>")
end if
Response.Write("<OPTION value=""-1"">" & Rec("Heading") & "</OPTION>")
szHeading = CStr(Rec("Heading"))
end if
end if
Response.Write("<OPTION value=""" & Rec("ProductID") & """> &nbsp;· &nbsp;" & _
Rec("ProductName") & "</OPTION>")
nCount = nCount + 1
Rec.MoveNext
loop

Hope somebody can help me, thanks and regards
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On