how to display a value in a progress bar

Posted on 2005-03-16
Medium Priority
Last Modified: 2013-12-24
I am looking for a java control that can visually display a value from 0 to 100.  This is for display a student test score.  So if they log in, they will be able to see their score visually (like a bar from 1 to 100) and the score will be place in the bar according to the score
Question by:xiaobao68
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

INSDivision6 earned 100 total points
ID: 13557475
Simplest way is to generate this on CF side.  Something like this:

<cfset score="80">

<cfoutput>Score: #score#</cfoutput>
<table width="200" border="1" cellspacing="0" cellpadding="0">
<tr height="10">
<cfloop index="i" from="1" to="100">
   <cfif i LTE score>
      <td width="2" bgcolor="#FF0000">
      <td width="2" bgcolor="#FFFFFF">

Assisted Solution

black0ps earned 100 total points
ID: 13559930
<table width="202" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="000000">
<td background="images/score.gif" align="right" height="11"><img id="score1" src="Images/scoreover.gif" width="" height="15"></td>
<script language="JavaScript">
document.getElementById('score1').style.width = '73%';

Give that a try. I think that should work. And it's in Javascript...

-- Ian

Featured Post

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question