View Single Post
07-01-2007, 08:27 PM
#4
Seraskier is offline Seraskier
Status: I love this place
Join date: Jan 2007
Location: Charlotte
Expertise:
Software:
 
Posts: 542
iTrader: 0 / 0%
 

Seraskier is an unknown quantity at this point

Send a message via AIM to Seraskier Send a message via MSN to Seraskier

  Old

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...