You are here: Re: Loading progress bar « PHP Programming Language « IT news, forums, messages
Re: Loading progress bar

Posted by Aggelos on 10/31/06 12:14

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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация