Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3318626
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:43:43+00:00 2026-05-17T22:43:43+00:00

I have this code below and want it to show the progress of a

  • 0

I have this code below and want it to show the progress of a form submission of a file upload. I want it to work on my website visit it through this IP (24.148.156.217). So if you saw the website I want the progress bar to be displayed when the user fills in the information and then hits the submit button. Then the progress bar displays with the time until it’s finished.

    <style>
<!--
.hide { position:absolute; visibility:hidden; }
.show { position:absolute; visibility:visible; }
-->
</style>

<SCRIPT LANGUAGE="JavaScript">

//Progress Bar script- by Todd King (tking@igpp.ucla.edu)
//Modified by JavaScript Kit for NS6, ability to specify duration
//Visit JavaScript Kit (http://javascriptkit.com) for script

var duration=3 // Specify duration of progress bar in seconds
var _progressWidth = 50; // Display width of progress bar.

var _progressBar = "|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"
var _progressEnd = 5;
var _progressAt = 0;


// Create and display the progress dialog.
// end: The number of steps to completion
function ProgressCreate(end) {
 // Initialize state variables
 _progressEnd = end;
 _progressAt = 0;

 // Move layer to center of window to show
 if (document.all) { // Internet Explorer
  progress.className = 'show';
  progress.style.left = (document.body.clientWidth/2) - (progress.offsetWidth/2);
  progress.style.top = document.body.scrollTop+(document.body.clientHeight/2) - (progress.offsetHeight/2);
 } else if (document.layers) { // Netscape
  document.progress.visibility = true;
  document.progress.left = (window.innerWidth/2) - 100+"px";
  document.progress.top = pageYOffset+(window.innerHeight/2) - 40+"px";
 } else if (document.getElementById) { // Netscape 6+
  document.getElementById("progress").className = 'show';
  document.getElementById("progress").style.left = (window.innerWidth/2)- 100+"px";
  document.getElementById("progress").style.top = pageYOffset+(window.innerHeight/2) - 40+"px";
 }

 ProgressUpdate(); // Initialize bar
}

// Hide the progress layer
function ProgressDestroy() {
 // Move off screen to hide
 if (document.all) { // Internet Explorer
  progress.className = 'hide';
 } else if (document.layers) { // Netscape
  document.progress.visibility = false;
 } else if (document.getElementById) { // Netscape 6+
  document.getElementById("progress").className = 'hide';
 }
}

// Increment the progress dialog one step
function ProgressStepIt() {
 _progressAt++;
 if(_progressAt > _progressEnd) _progressAt = _progressAt % _progressEnd;
 ProgressUpdate();
}

// Update the progress dialog with the current state
function ProgressUpdate() {
 var n = (_progressWidth / _progressEnd) * _progressAt;
 if (document.all) { // Internet Explorer
  var bar = dialog.bar;
  } else if (document.layers) { // Netscape
  var bar = document.layers["progress"].document.forms["dialog"].bar;
  n = n * 0.55; // characters are larger
 } else if (document.getElementById){
                var bar=document.getElementById("bar")
        }
 var temp = _progressBar.substring(0, n);
 bar.value = temp;
}

// Demonstrate a use of the progress dialog.
function Demo() {
 ProgressCreate(10);
 window.setTimeout("Click()", 100);
}

function Click() {
 if(_progressAt >= _progressEnd) {
  ProgressDestroy();
  return;
 }
 ProgressStepIt();
 window.setTimeout("Click()", (duration-1)*1000/10);
}

function CallJS(jsStr) { //v2.0
  return eval(jsStr)
}

</script>

<SCRIPT LANGUAGE="JavaScript">

// Create layer for progress dialog
document.write("<span id=\"progress\" class=\"hide\">");
 document.write("<FORM name=dialog id=dialog>");
 document.write("<TABLE border=2  bgcolor=\"#FFFFCC\">");
 document.write("<TR><TD ALIGN=\"center\">");
 document.write("Progress<BR>");
 document.write("<input type=text name=\"bar\" id=\"bar\" size=\"" + _progressWidth/2 + "\"");
 if(document.all||document.getElementById)  // Microsoft, NS6
  document.write(" bar.style=\"color:navy;\">");
 else // Netscape
  document.write(">");
 document.write("</TD></TR>");
 document.write("</TABLE>");
 document.write("</FORM>");
document.write("</span>");
ProgressDestroy(); // Hides

</script>


<form name="form1" method="post">
<center>
<input type="button" name="Demo" value="Display progress" onClick="CallJS('Demo()')">
</center>
</form>

<a href="javascript:CallJS('Demo()')">Text link example</a>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T22:43:44+00:00Added an answer on May 17, 2026 at 10:43 pm

    JQuery UI has a progress bar feature.

    This is a purely CSS progress bar that works on most browsers including IE6.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code in jQuery, that I want to reimplement with the prototype
I have this code: myVariable which I want to change into trace(myVariable: + myVariable);
I have this code: chars = #some list try: indx = chars.index(chars) except ValueError:
I have this code that performs an ajax call and loads the results into
I have this code #include <iostream> using namespace std; int main(int argc,char **argv) {
I have this code: CCalcArchive::CCalcArchive() : m_calcMap() { } m_calcMap is defined as this:
I have this code while($row = mysql_fetch_row($result)) { echo '<tr>'; $pk = $row[0]['ARTICLE_NO']; foreach($row
I have this code <?php session_start(); if (isset($_GET[cmd])) $cmd = $_GET[cmd]; else die(You should
I have this code, which works fine, but I would like to be able
I have this code :- using (System.Security.Cryptography.SHA256 sha2 = new System.Security.Cryptography.SHA256Managed()) { .. }

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.