Looking for ..........

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Willard Reese

    #1

    Looking for ..........

    I need a javascript that will show something like a thermometer where
    the thermometer fluid can be periodically set to a certain level.
    Something like they use to display progress in fund raising efforts.
    (like Community Chest drives).
    Can anyone help?

    Hap Reese
  • Fabian

    #2
    Re: Looking for ..........

    areese@no-spam bestnetpc.com (Willard Reese) hu kiteb:
    [color=blue]
    > I need a javascript that will show something like a thermometer where
    > the thermometer fluid can be periodically set to a certain level.
    > Something like they use to display progress in fund raising efforts.
    > (like Community Chest drives).
    > Can anyone help?[/color]

    I'd implement this as a background gif with the basic thermometer shape,
    and another gif as a red line. I'd then manipulate the height attribute
    of teh second to stretch it to the desired height. I've no idea if
    anything like this has been made before.


    --
    --
    Fabian
    This post is not associated in any way with forum4designers dot com.
    Permission is specifically denied for that website to archive this post
    or display it in any way.

    Comment

    • McKirahan

      #3
      Re: Looking for ..........

      <areese@no-spam bestnetpc.com (Willard Reese)> wrote in message
      news:SeX0eCb8xM iX-pn2-hTIk07ycHxQD@da ytona-as-1-ip-4.atlantic.net. ..[color=blue]
      > I need a javascript that will show something like a thermometer where
      > the thermometer fluid can be periodically set to a certain level.
      > Something like they use to display progress in fund raising efforts.
      > (like Community Chest drives).
      > Can anyone help?
      >
      > Hap Reese[/color]


      You could just have several versions of a thermometer image each
      representing a different level.

      Here's an image that could serve as a base:




      Comment

      • Bas Cost Budde

        #4
        Re: Looking for ..........

        Fabian wrote:
        [color=blue]
        > areese@no-spam bestnetpc.com (Willard Reese) hu kiteb:
        >
        >[color=green]
        >>I need a javascript that will show something like a thermometer where
        >>the thermometer fluid can be periodically set to a certain level.
        >>Something like they use to display progress in fund raising efforts.
        >>(like Community Chest drives).
        >>Can anyone help?[/color]
        >
        >
        > I'd implement this as a background gif with the basic thermometer shape,
        > and another gif as a red line. I'd then manipulate the height attribute
        > of teh second to stretch it to the desired height. I've no idea if
        > anything like this has been made before.[/color]

        If you don't want to use graphics, you can experiment with a table cell
        changing the border width from one side.

        --
        Bas Cost Budde

        but the domain is nl

        Comment

        • Willard Reese

          #5
          Re: Looking for ..........

          Thank for the suggestions and for the great thermometer. I'll work on
          this. Good start. thanks all.
          Willard


          On Wed, 11 Feb 2004 23:48:40, "McKirahan" <News@McKirahan .com> wrote:
          [color=blue]
          > <areese@no-spam bestnetpc.com (Willard Reese)> wrote in message
          > news:SeX0eCb8xM iX-pn2-hTIk07ycHxQD@da ytona-as-1-ip-4.atlantic.net. ..[color=green]
          > > I need a javascript that will show something like a thermometer where
          > > the thermometer fluid can be periodically set to a certain level.
          > > Something like they use to display progress in fund raising efforts.
          > > (like Community Chest drives).
          > > Can anyone help?
          > >
          > > Hap Reese[/color]
          >
          >
          > You could just have several versions of a thermometer image each
          > representing a different level.
          >
          > Here's an image that could serve as a base:
          >
          > http://www.uwev.org/images/thermometer.gif
          >
          >[/color]

          Hap Reese

          Comment

          • Yann-Erwan Perio

            #6
            Re: Looking for ..........

            Willard Reese wrote:
            [color=blue]
            > I need a javascript that will show something like a thermometer where
            > the thermometer fluid can be periodically set to a certain level.[/color]

            Using images can be good to provide some background appearance, and you
            can then use javascript to have the thermometer level adjusted, changing
            height of simple HTML div elements.


            <style type="text/css">
            div#container{
            position:absolu te;bottom:10%;r ight:10%;
            width:20px;heig ht:200px;
            background:#c00 ;
            border:ridge 1px #000;
            overflow:hidden ;
            }
            div#container div{
            background:#eee ;
            line-height:0;
            height:100%;
            }
            </style>

            <script type="text/javascript">
            onload=function (evt){
            this["thermomete r"]=function(){
            var $th=null;

            function getm(dir){
            var
            ptr_c=document. getElementById( "container" ),
            ptr_t=ptr_c.get ElementsByTagNa me("div")[0];
            dir*=-1;
            return function(m){
            m=ptr_t.offsetH eight+dir*m;
            if(0<m&&m<ptr_c .offsetHeight)
            ptr_t.style.hei ght=m+"px";
            }
            }

            if(document.get ElementById&&
            document.getEle mentsByTagName) {
            $th={
            up:getm(+1),
            down:getm(-1)
            };
            }

            return $th;
            }();

            if(this["thermomete r"]){
            setTimeout(
            function(){
            this["thermomete r"]
            [Math.random()<0 .6?"up":"down"](Math.random()* 5|0);
            setTimeout(argu ments.callee,40 );
            },
            50
            );
            }
            }
            </script>

            <div id="container"> <div>&nbsp;</div></div>

            Comment

            Working...