Este es el codigo:
Código PHP:
Ver original<?php
include("conexion.php");
' . $_SESSION['usuario'] . '
user_login();
echo '<meta http-equiv="Refresh" content="5;url=perfil.php"> ';
echo' <html>
<head>
<style type="text/css">/*Container*/
.progress-bar {
border: 1px solid #56577A;
width: 200px;
margin: 5px;
padding: 1px;
background: #fff;
float: left;
-moz-border-radius:5px 5px 5px 5px;
-ms-border-radius: 5px 5px 5px 5px;
-webkit-border-radius: 5px 5px 5px 5px;
border-radius: 5px 5px 5px 5px;
}
.bar {
height: 15px;
font-size: 11px;
text-indent:-9000px;
-moz-border-radius:5px 5px 5px 5px;
-ms-border-radius: 5px 5px 5px 5px;
-webkit-border-radius: 5px 5px 5px 5px;
border-radius: 5px 5px 5px 5px;
}
</style>
<script type="text/javascript">
window.onload = function() {initialize()}
function initialize() {
divId = "sample";
thedivId = document.getElementById(divId);
var percentage = thedivId.innerHTML;
thedivId.style.backgroundColor="#000";
brim(divId,0,parseInt(percentage.substr(0, percentage.length-1)));
}
function brim(Id,start,percentage) {
if (document.getElementById) {
o = document.getElementById(Id);
if (start <= percentage) {
setWidth(o, start);
start += 1;
//Show progression percentage near the progress bar
document.getElementById("percentage").innerHTML = (start -1) + "%";
window.setTimeout("brim('"+Id+"',"+start+","+percentage+")", 50);
}
}
}
function setWidth(o, start) {
o.style.width = start+"%";
}
</script>
</head>
<body>
<div class="progress-bar" >
<div id ="sample" class="bar">100%</div>
</div>
<div id ="percentage"></div>
</body>
</head>';
?>
el problema es que no me funciona el script
cual es el fallo?