Re: Loading progress bar
- From: "Aggelos" <djjelly@xxxxxxxxx>
- Date: 31 Oct 2006 04:14:18 -0800
OK thanks everybody
I finally did it with javascript, updating the width of a div using the
folowing script:
function getRefToDiv(divID,oDoc) {
if( document.getElementById ) {
return document.getElementById(divID); }
if( document.all ) {
return document.all[divID]; }
if( !oDoc ) { oDoc = document; }
if( document.layers ) {
if( oDoc.layers[divID] ) { return oDoc.layers[divID]; } else {
//repeatedly run through all child layers
for( var x = 0, y; !y && x < oDoc.layers.length; x++ ) {
//on success, return that layer, else return nothing
y = getRefToDiv(divID,oDoc.layers[x].document); }
return y; } }
return false;
}
function rSDiv(oName,newWidth,newHeight) {
var myReference = getRefToDiv(oName), noPx = document.childNodes ?
'px' : 0;
if( myReference.style ) { myReference = myReference.style; }
if( myReference.resizeTo ) { myReference.resizeTo( newWidth,
newHeight ); }
myReference.width = newWidth + noPx; myReference.pixelWidth =
newWidth;
myReference.height = newHeight + noPx; myReference.pixelHeight =
newHeight;
}
<?php
echo '<script>rSDiv(\'myDiv\','.($this->percent / 100) *
$this->width.',20);</script>';
?>
I'd like to know if there is an AJAX equivalent but I don't have time
to look around any more.
Thank you.
.
- References:
- Loading progress bar
- From: Aggelos
- Loading progress bar
- Prev by Date: error in calling a stored procedure in php
- Next by Date: Re: Can no connects to mySQL database
- Previous by thread: Re: Loading progress bar
- Next by thread: PHP + Upload + picture script
- Index(es):
Relevant Pages
|