Code:
<script type="text/javascript">
var c = 0
function progress()
{
document.getElementById('percent').innerHTML = c + "%"
c = c + 1
t = setTimeout( "progress()", 50 )
if ( c - 1 == 100 ) { clearTimeout( t ) }
}
</script>
<style type="text/css">
.file
{
height: 22px;
margin-right: 2px;
border: 1px #000000 solid;
}
.submit
{
width: 100px;
border: 1px #000000 solid;
}
.progress
{
background-color: #000000;
text-align: right; color: #FFFFFF; font-size: 9;
padding-left: 3px; padding-right: 4px;
filter: alpha( opacity = 100 );
}
</style>
<?php
$max_width = "300"; $width = "";
echo '<input type="file" class="file" style="width: '.($max_width + 83).'px" >';
echo '<input type="submit" class="submit" value="Upload" onClick="progress()">';
echo '<div class="progress" name="progress" style="width: '.$width.'px"><a id="percent"></a></div>';
?>
i dont know if that helps.. but i need to get the c variable and make it the width...