Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Javascript (https://www.askmehelpdesk.com/forumdisplay.php?f=452)
-   -   Javascript for percentage bar (https://www.askmehelpdesk.com/showthread.php?t=396247)

  • Sep 14, 2009, 03:26 AM
    nitika123
    Javascript for percentage bar
    Hi All

    I want to add a progress bar on my website such as at naukri.com. My website is divided into four sections each having 20-40 forms.I don't know the javascript at all. Please tell me how can I make the progress bar using css and javascript. Also tell me how will the percentage increase when user fills one form and clicks on next to fill another form.
  • Jul 1, 2010, 11:39 PM
    objectundefined
    HTML Code:


    <div style="border:1px solid black;width:200px;height:15px;position:relative">

        <div id="progress" style="height:15px;width:0%;float:left;background-color:black"></div>

    </div>

    JS: (when percentage needs updating... example sets progress to 50%)
    Code:

    document.getElementById('progress').style.width="50%";

  • All times are GMT -7. The time now is 02:24 AM.