Thermometer / Gauge display.

Discussion in 'ASP General' started by Alex Stevens, Sep 22, 2003.

  1. Alex Stevens

    Alex Stevens Guest

    Hi All,

    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??

    Thanks

    Alex Stevens
    Alex Stevens, Sep 22, 2003
    #1
    1. Advertising

  2. Alex Stevens

    Evertjan. Guest

    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:green;
    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:green;
    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:green;
    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:green;
    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)
    Evertjan., Sep 22, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Imran Aziz
    Replies:
    4
    Views:
    1,505
    Imran Aziz
    Aug 11, 2005
  2. fiddlehead

    Pythoncard - gauge component.

    fiddlehead, Aug 4, 2005, in forum: Python
    Replies:
    0
    Views:
    443
    fiddlehead
    Aug 4, 2005
  3. draegon
    Replies:
    0
    Views:
    430
    draegon
    Jul 18, 2007
  4. David C

    Gauge controls

    David C, Dec 1, 2009, in forum: ASP .Net
    Replies:
    1
    Views:
    343
  5. Heinrich Piard

    snmp Gauge 32 .to_s or .to_i ???

    Heinrich Piard, Apr 12, 2008, in forum: Ruby
    Replies:
    1
    Views:
    201
    Heinrich Piard
    Apr 15, 2008
Loading...

Share This Page