PDA

View Full Version : Javascript for percentage bar


nitika123
Sep 14, 2009, 03:26 AM
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.

objectundefined
Jul 1, 2010, 11:39 PM
<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%)


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