I have a function written in js. I need to call this as soon aspage is finished loading. Now i am displacing this on mousehover event. I dont want to call this event, i want to see this change as soon as page is finished loading. Onload() doesnt work for me. i am using ie8.
$countDetails is a computed value.
Code:
<!DOCTYPE html> <html> <body> <head> <style> #blank_bar{ width: 100px; height: 15px; background:grey; } #filled_bar{ height: 15px; background:green; }</style> <script> function load() { var elem = document.getElementById('filled_bar'); elem.style.width=$countDetails + "%"; } </script> <p><b>Estimate Completion:  $countDetails% complete</b></p> <div id="blank_bar"><div id="filled_bar" onmouseover="load()"></div></div> </div> </body> </html>
Comment