Current location: Hot Scripts Forums » Advertising Forums » Website Reviews » Rotating Cell Colours - ASP


Rotating Cell Colours - ASP

Reply
  #1 (permalink)  
Old 06-11-03, 07:38 PM
Stealth Stealth is offline
1337 pr0gr4mm3r
 
Join Date: Jun 2003
Location: Glasgow, Scotland
Posts: 188
Thanks: 0
Thanked 0 Times in 0 Posts
Rotating Cell Colours - ASP

You see websites with cell colours rotated as each row is shown. Heres the code in ASP

Code:
<%	Dim Cell_Count
	Dim Cell_Colour %>

<table width="100%" border="1" cellspacing="0" cellpadding="0">

<% 'Loop 10 times
For N = 0 to 9
		'Colours here. You can add more colours using the ElseIf function.
	If Cell_Count = 0 then
	  Cell_Colour = "Green"
	Else
	  Cell_Colour = "Red"
	End If %>
	
			  <tr bgcolor="<%=Cell_Colour%>">
				<td>&nbsp;</td>
	
<%		'Add more numbers as you add more colours by using the ElseIf function again!
	If Cell_Count = 0 Then
	  Cell_Count = 1
	Else
	  Cell_Count = 0
	End If
Next %>

  </tr>
</table>

its a bit muddled but hey, i got an excuse! its 1:30 am!!!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Validator ctrl in table cell : Strange behaviour sunny_doncaster ASP.NET 6 07-31-08 09:43 AM


All times are GMT -5. The time now is 02:09 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.