Alex Stevens wrote on 22 sep 2003 in
microsoft.public.inetserver.asp.general:
On my site we are about to run a fundraising scheme.
I would like to display on there a thermometer to show how far we have
got to reach our total........
Does anybody know of a free example of this, or have they done this
themselves??
Build it from scratch:
========= test.asp ==============
<%
' for 20%
pct=20
a=500*pct/100
b=500-a
%>
<div style=width:50px;float:left;>
<%=pct%> %
<div style="width:15px;height:500px;background.color:gr een;
padding-left:4px;padding-top:<%=b%>px;">
<div style="width:7px;height:<%=a%>px;background.color: red;">
</div></div></div>
<%
' for 63%
pct=63
a=500*pct/100
b=500-a
%>
<div style=width:50px;float:left;>
<%=pct%> %
<div style="width:15px;height:500px;background.color:gr een;
padding-left:4px;padding-top:<%=b%>px;">
<div style="width:7px;height:<%=a%>px;background.color: red;">
</div></div></div>
<%
' for 90%
pct=90
a=500*pct/100
b=500-a
%>
<div style=width:50px;float:left;>
<%=pct%> %
<div style="width:15px;height:500px;background.color:gr een;
padding-left:4px;padding-top:<%=b%>px;">
<div style="width:7px;height:<%=a%>px;background.color: red;">
</div></div></div>
<%
' for 47%
pct=47
a=500*pct/100
b=500-a
%>
<div style=width:50px;float:left;>
<%=pct%> %
<div style="width:15px;height:500px;background.color:gr een;
padding-left:4px;padding-top:<%=b%>px;">
<div style="width:7px;height:<%=a%>px;background.color: red;">
</div></div></div>
=================================
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)