|  | Posted by Aggelos on 10/31/06 12:14 
OK thanks everybodyI 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] |