title: progress bar for using java script unable to change color
body: <p>Am using html to upload images and created java code to track uploading progress<br>ERROR is am unable to change color of progress loading color<br> bellow is the code am using to upload images could u please help me<br>how do i change color of progress </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script&gt;
  function _(el){
  return document.getElementById(el);
  }
  function uploadFile(){
  var file = _("file1").files[0];
  var formdata = new FormData();
  formdata.append("file1", file);
  var ajax = new XMLHttpRequest();
  ajax.upload.addEventListener("progress", progressHandler, false);
  ajax.addEventListener("load", completeHandler, false);
  ajax.addEventListener("error", errorHandler, false);
  ajax.addEventListener("abort", abortHandler, false);
  ajax.open("POST", "for.php");
  ajax.send(formdata);
  }
  function progressHandler(event){
  _("loaded_n_total").innerHTML = "Uploaded "+event.loaded+" bytes of "+event.total;
  var percent = (event.loaded / event.total) * 100;
  _("progressBar").value = Math.round(percent);
  _("status").innerHTML = Math.round(percent)+"% uploaded... please wait";
  }
  function completeHandler(event){
  _("status").innerHTML = event.target.responseText;
  _("progressBar").value = 0;
  }
  function errorHandler(event){
  _("status").innerHTML = "Upload Failed";
  }
  function abortHandler(event){
  _("status").innerHTML = "Upload Aborted";
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;h2&gt;HTML5 File Upload Progress Bar Tutorial&lt;/h2&gt;
  &lt;form id="upload_form" action="for.php"  enctype="multipart/form-data" method="post"&gt;
    &lt;input type="file" name="file1" id="file1"&gt;&lt;progress id="progressBar" value="0" max="100"     style="width:100px;"&gt;&lt;/progress&gt;
  &lt;input type="button" value="Upload File" onclick="uploadFile()"&gt;
      &lt;h3 id="status"&gt;&lt;/h3&gt;
    &lt;p id="loaded_n_total"&gt;&lt;/p&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>for.php</p>
  
  <pre><code>&lt;?php
  $fileName = $_FILES["file1"]["name"]; // The file name
  $fileTmpLoc = $_FILES["file1"]["tmp_name"]; // File in the PHP tmp folder
  $fileType = $_FILES["file1"]["type"]; // The type of file it is
  $fileSize = $_FILES["file1"]["size"]; // File size in bytes
  $fileErrorMsg = $_FILES["file1"]["error"]; // 0 for false... and 1 for true
  if (!$fileTmpLoc) { // if file not chosen
  echo "ERROR: Please browse for a file before clicking the upload button.";
  exit();
  }
  if(move_uploaded_file($fileTmpLoc, "uploads/$fileName")){
  echo "$fileName upload is complete";
  } else {
  echo "move_uploaded_file function failed";
  }
  ?&gt;
  </code></pre>
  
  <p>here is the demo <a href="http://sanojword.net23.net/PhpProject2/" rel="nofollow">http://sanojword.net23.net/PhpProject2/</a></p>