@KorJul 25.2005 — #if your object is an image, increasing/decreasing it's size will definitelly ruin it's accuracy, as HTML and javascript are "bitmap" oriented... Flash will do that job properly.
@KorJul 25.2005 — #ok, in theory u should use a function which will add a [b]step[/b] number of pixels. This function is to be re-run/stopped using setTimeout(function,time) / clearTimeout() methods. The speed of growth can be controlled both by the set step and by the [b]time[/b] parameter of the setTimeout.
@KorJul 25.2005 — #here's a basic example: [code=php] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="Content-Style-Type" content="text/css"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <style type="text/css"> <!-- #mydiv{ background-color: #FF0000; height: 10px; width: 1px;
} --> </style> <script type="text/javascript"> var s = 4;//step of growth in px; var d = 80;//delay in milliseconds var lim = 200;//the max width in px function grow(){ var obj = document.getElementById('mydiv'); var w=obj.offsetWidth+s; if(w>=lim){obj.style.width = lim+'px';clearTimeout(setT)} else{obj.style.width = w+'px';var setT=setTimeout('grow()',d)} } </script> </head> <body> <a href="#" onclick="grow();return false">grow</a><br> <br> <div id="mydiv"></div> </body> </html> [/code]