Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 spreading records across 3 columns...
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

bobby131313
Senior Member

USA
1163 Posts

Posted - 22 February 2008 :  16:31:21  Show Profile  Visit bobby131313's Homepage
I've been playing with this for a few hours and can't get it right. Here is the code (Conquerrss) that displays an rss feed in a table...

	If (IsObject(rss)) Then
		Dim chn: Set chn = rss.Channel
		
		Response.Write("<table cellspacing='0' cellpadding='10'>")
		
		Dim lnk
		For Each  lnk in chn.Items
		counter = counter + 1
			Response.Write("<tr>")
			Response.Write("<td>")
			Response.Write("<div class='ebayitem'><a href='" & lnk.Link & "' target='_blank'>" & lnk.Title & "</a>")
			Response.Write(lnk.Description & "</div>")
			Response.Write("</td>")
			Response.Write("</tr>")
		if counter = 9 then Exit For
		Next
		
		Response.Write("</table>")
		
		' release used resources
		Set rss = Nothing
	Else		Response.Write("Could not read RSS from " & rssFeedUrl)
	End If


This displays one column like so. I use it everywhere and it works great.

I'm building something new and I want to use this, but I want to display the items in a 3 column table left-right first, then down...

1      2      3

4      5      6

7      8      9


I know it's probably something simple But I can't get it to work. Can someone help me please....

Switch the order of your title tags

phy1729
Average Member

USA
589 Posts

Posted - 22 February 2008 :  17:21:57  Show Profile

	If (IsObject(rss)) Then
		Dim chn: Set chn = rss.Channel

		Response.Write("<table cellspacing='0' cellpadding='10'><tr>")
		
		Dim lnk
		Dim n
		n=0
		For Each  lnk in chn.Items
			counter = counter + 1
			n=n+1
			Response.Write("<td>")
			Response.Write("<div class='ebayitem'><a href='" & lnk.Link & "' target='_blank'>" & lnk.Title & "</a>")
			Response.Write(lnk.Description & "</div>")
			Response.Write("</td>")
			If n=3 Then 
				Response.Write("</tr><tr>")
				n=0
			End If
			If counter = 9 Then Exit For
		Next
		
		Response.Write("</tr></table>")
		
		' release used resources
		Set rss = Nothing
	Else		Response.Write("Could not read RSS from " & rssFeedUrl)
	End If
Go to Top of Page

bobby131313
Senior Member

USA
1163 Posts

Posted - 22 February 2008 :  19:19:30  Show Profile  Visit bobby131313's Homepage
Awesome!

Thank you very much. I'm off to finish my project.

Switch the order of your title tags
Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 22 February 2008 :  19:48:50  Show Profile
Your Welcome.
Go to Top of Page

bobby131313
Senior Member

USA
1163 Posts

Posted - 23 February 2008 :  00:43:08  Show Profile  Visit bobby131313's Homepage
Here's what I'm playing with ... it works great, thanks again.

Switch the order of your title tags
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.25 seconds. Powered By: Snitz Forums 2000 Version 3.4.07