473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
Jul 20 '05 #1
5 4325
areese@no-spam bestnetpc.com (Willard Reese) hu kiteb:
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?


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.

Jul 20 '05 #2
<areese@no-spam bestnetpc.com (Willard Reese)> wrote in message
news:Se***************************@daytona-as-1-ip-4.atlantic.net...
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

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
Jul 20 '05 #3
Fabian wrote:
areese@no-spam bestnetpc.com (Willard Reese) hu kiteb:

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?

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.


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
http://www.heuveltop.org/BasCB
but the domain is nl

Jul 20 '05 #4
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" <Ne**@McKirahan.com> wrote:
<areese@no-spam bestnetpc.com (Willard Reese)> wrote in message
news:Se***************************@daytona-as-1-ip-4.atlantic.net...
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

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


Hap Reese
Jul 20 '05 #5
Willard Reese wrote:
I need a javascript that will show something like a thermometer where
the thermometer fluid can be periodically set to a certain level.


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:absolute;bottom:10%;right:10%;
width:20px;height: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["thermometer"]=function(){
var $th=null;

function getm(dir){
var
ptr_c=document.getElementById("container"),
ptr_t=ptr_c.getElementsByTagName("div")[0];
dir*=-1;
return function(m){
m=ptr_t.offsetHeight+dir*m;
if(0<m&&m<ptr_c.offsetHeight)
ptr_t.style.height=m+"px";
}
}

if(document.getElementById&&
document.getElementsByTagName){
$th={
up:getm(+1),
down:getm(-1)
};
}

return $th;
}();

if(this["thermometer"]){
setTimeout(
function(){
this["thermometer"]
[Math.random()<0.6?"up":"down"](Math.random()*5|0);
setTimeout(arguments.callee,40);
},
50
);
}
}
</script>

<div id="container"><div>&nbsp;</div></div>
Jul 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Jason Daly | last post by:
I'm a freshman at college as a computer science major. I'm not sure it has what I want. Does anyone know if a major commonly exists in web design (focusing in server side languages)? I want to...
4
by: Frank Einstein | last post by:
Looking for a tool that can edit an XML file in a browser. The basic requirement is that the XML file is rendered as an HTML form with editable fields (including add/delete, preferably in...
2
by: Wayne Wengert | last post by:
I hope this is an appropriate group for this question? I work with a non-profit group that uses SQL Server 2000 for their data backend. They have a moderate size web site with many data driven...
51
by: Matt | last post by:
Hello, I'm a hiring C++ developer employer looking for existing, online C++ aptitude tests. I have not yet extensively researched this yet, but as an example, I thought this test looked...
1
by: Johann Blake | last post by:
I am looking for a good solution on how to implement data access in an application so that there is a clean separation between the data access layer, the business layer and the GUI layer. I am...
1
by: marklinehan | last post by:
Hi, my name is Mark Linehan. About 20 years ago or so I started learning how to program on the Commodore 64 computer (anyone remember those?) heheheh. I taught myself basic on this little machine...
2
by: Matt | last post by:
Hi, I am looking for a control that will allow me to host other controls inside it but have a method of showing and hiding. I have seen plenty of horizontal controls for doing this but I am looking...
11
by: matsi.inc | last post by:
I am looking to make something like a delegate that i can use in my projects but am having a hard time getting started. The behavior I am most interested in is how a delegate changes it's Invoke...
12
by: amogan | last post by:
**If interested & qualified, please reply with your resume directly to amogan@google.com** Referrals are always welcome!! Network System Test Engineer - Mountain View This position is...
6
by: beantaxi | last post by:
Hello all, I'm looking for a very simple code analysis tool. I have a large codebase to analyze, and all I really need to do is to find all uses of all methods in a few interfaces. Many tools...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.