Forums

This topic is locked

Thermometer

Posted 29 Oct 2002 20:54:32
1
has voted
29 Oct 2002 20:54:32 Randy Huitema posted:
We are doing a fund raisung drive for United Way and would like to post a Termometer that we can update with new numbers each day.

Is there anything out there that would control such a thing. I am think of having a DB with one filed where the value can be updated and the graphic changes.

Randy

Replies

Replied 30 Oct 2002 02:40:43
30 Oct 2002 02:40:43 Owen Eastwick replied:
You could create a graphic with a scale on it, lets say 0 - 100.

You can now create a table with a background a asign a height to it from a value in the database. So if the value in the database the table will be 10 pixels high, something like:

<table width="20" height="<%=RecordsetName.Fields.Item("FieldName".Value%>" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="141" bgcolor="#0066FF"> </td>
</tr>
</table>

If you scale goes from 0 - 100 but your scale greaphic id 250 pixels high you can factor the database value so that it fits the scale:

<table width="20" height="<%= RecordsetName.Fields.Item("FieldName".Value * 2.5 %>" border="0" cellpadding="0" cellspacing="0">


Cut and paste the following into a blank html file:

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<table width="78" height="300" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="20" valign="bottom"> <table width="20" height="141" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="141" bgcolor="#0066FF"> </td>
</tr>
</table> </td>
<td width="81" valign="bottom">- 100<br>
- 90<br>
- 80<br>
- 70<br>
- 60<br>
- 50<br>
- 40<br>
- 30<br>
- 20<br>
- 10<br>
- 0</td>
</tr>
</table>
</body>
</html>

I've just used text in the example but you should be able to see what I'm going on about.


Regards

Owen.

Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo

Edited by - oeastwick on 30 Oct 2002 02:41:51

Reply to this topic