ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 13th, 2012, 10:53 PM
thall89553 thall89553 is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jan 2004
Location: Budapest
Posts: 1,702 thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 5 Days 18 h 38 m 9 sec
Reputation Power: 66
Send a message via Yahoo to thall89553
Help w/ Categorized Loop Iteration

I am not sure why I am having problems with this but I am. I have a web page that displays a menu for a Japanese restaurant as seen here - Menu

As you can see the menu is broken up into categories, such as Appetizers, Carpaccio, etc.

I have a recordset that I am looping through and I have been able to code it to output a category header when the category changes. What I am trying to do is wrap the whole thing in a div. I don't have a problem putting in the opening div tag (w/ the header of course), but it is the closing div tag that is troubling me.

Here is my code

Code:
<%

Do Until rs.eof 


If varx <> rs("cat_id") Then
response.write "<h3 class='category_title'>" & rs("category") & "</h3>" & vbcrlf
If rs("description") <> "" Then 
response.write "<p class='category_desc'>" &  rs("description") & "</p>" & vbcrlf
End If
varx = rs("cat_id")
End If


response.write "<div  class='menu_item'>" & vbcrlf
response.write "<h3><span>" & rs("Item_Name") & "</span></h3>" & vbcrlf
if rs("Item_Desc") <> "" Then
response.write "<p>" & rs("Item_Desc") & "</p>" & vbcrlf
End If
response.write "</div>" & vbcrlf
response.write "<div class='menu_item_price'>6.5</div>" & vbcrlf & vbcrlf

rs.movenext


Loop
%>
__________________
Today the world, tomorrow the universe...

Last edited by thall89553 : March 14th, 2012 at 12:30 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Help w/ Categorized Loop Iteration

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap