Hey Craig,

Try this code out and let me know what you feel;

      <%
      Calendar = 30
      Poster = 10
      Manager = 60
      Online = 45
      Mouth = 25
      AwarenessOther = 70
     
      %>
      
      
      <table cellspacing="0" cellpadding="0" border="0">
      <%If Calendar <> "0" Then %>
                        <tr>
                        <td nowrap><font face="arial" Size="1"><%=Calendar%>
Calendar</font></td>
                        <td valign=top><table  Height="6"
Width="<%=Calendar*20%>"
bgcolor=Red><tr><td>&nbsp;</td></tr></table></td></tr>
        <%End If%>
      <%If Poster <> "0" Then %>
                        <tr>
                        <td nowrap><font face="arial" Size="1"><%=Poster%>
Poster</font></td>
                        <td valign=top><table Height="6"
Width="<%=Poster*20%>"
bgcolor="blue"><tr><td>&nbsp;</td></tr></table></td></tr>
      <%End If%>
      <%If Manager <> "0" Then %>
                        <tr>
                        <td nowrap><font face="arial" Size="1"><%=Manager%>
Manager</font></td>
                        <td valign=top><table Height="6"
Width="<%=Manager*20%>"
bgcolor="green"><tr><td>&nbsp;</td></tr></table></td></tr>
      <%End If%>
      <%If Online <> "0" Then %>
                        <tr>
                        <td nowrap><font face="arial" Size="1"><%=Online%>
Online Calendar</font></td>
                        <td valign=top><table Height="6"
Width="<%=Online*20%>"
bgcolor="black"><tr><td>&nbsp;</td></tr></table></td></tr>
      <%End If%>
      <%If Mouth <> "0" Then %>
                        <tr>
                        <td nowrap><font face="arial" Size="1"><%=Mouth%>
Word of mouth</font></td>
                        <td valign=top><table Height="6"
Width="<%=Mouth*20%>"
bgcolor="yellow"><tr><td>&nbsp;</td></tr></table></td></tr>
      <%End If%>
      <%If AwarenessOther <> "0" Then %>
                        <tr ><td nowrap><font face="arial"
Size="1"><%=AwarenessOther%> Other</font></td>
                        <td valign=top ><table Height="6"
Width="<%=AwarenessOther*20%>"
bgcolor="orange"><tr><td>&nbsp;</td></tr></table></td></tr>
      <%End If%>
      </table>

-----Original Message-----
From: Steve Abaffy [mailto:sabaffy@;cditelecom.com] 
Sent: Tuesday, October 29, 2002 3:58 PM
To: ActiveServerPages
Subject: RE: Dynamically setting image values

if you set the image height to 10 does it still occur???

-----Original Message-----
From: Craig [mailto:nealweb@;telusplanet.net]
Sent: Tuesday, October 29, 2002 1:45 PM
To: ActiveServerPages
Subject: Dynamically setting image values


I'm dynamically trying to create a graph based on values that come out of
a database. Here's part of the code:

      <table cellspacing="0" cellpadding="0" border="0">
      <%If Calendar <> "0" Then %><tr><td><img border="0" Height="6"
Width="<%=Calendar*20%>" src="graphgifs/red.gif"> <font face="arial"
Size="1"><%=Calendar%> Calendar</font></td></tr><%End If%>
      <%If Poster <> "0" Then %><tr><td><img border="0" Height="6"
Width="<%=Poster*20%>" src="graphgifs/blue.gif"> <font face="arial"
Size="1"><%=Poster%> Poster</font></td></tr><%End If%>
      <%If Manager <> "0" Then %><tr><td><img border="0" Height="6"
Width="<%=Manager*20%>" src="graphgifs/green.gif"> <font face="arial"
Size="1"><%=Manager%> Manager</font></td></tr><%End If%>
      <%If Online <> "0" Then %><tr><td><img border="0" Height="6"
Width="<%=Online*20%>" src="graphgifs/black.gif"> <font face="arial"
Size="1"><%=Online%> Online Calendar</font></td></tr><%End If%>
      <%If Mouth <> "0" Then %><tr><td><img border="0" Height="6"
Width="<%=Mouth*20%>" src="graphgifs/yellow.gif"> <font face="arial"
Size="1"><%=Mouth%> Word of mouth</font></td></tr><%End If%>
      <%If AwarenessOther <> "0" Then %><tr><td><img border="0" Height="6"
Width="<%=AwarenessOther*20%>" src="graphgifs/orange.gif"> <font
face="arial" Size="1"><%=AwarenessOther%> Other</font></td></tr><%End If%>
      </table>

It's working great except for one thing. I want the image in each table
row to be flush with the table row beneath it without a bunch of extra
spacing so it actually looks like a graph. I've set cellpadding and
cellspacing both to "0" and ensured there is no table border yet I still
get a few pixels of space between the table rows :(

Any ideas please?

---
You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%




---
You are currently subscribed to activeserverpages as:
[EMAIL PROTECTED]
To unsubscribe send a blank email to
%%email.unsub%%

---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to