visto che non ne andavo fuori ho ricreato sta funz....solo che mi allerta con finito all'infinito...(scusate il gioco di parole)...
Codice PHP:
var is_started;
function resize_obj(id_oggetto,to_x,to_y) {
var obj = document.getElementById(id_oggetto);
var now_x = new Number(obj.clientWidth);
var now_y = new Number(obj.clientHeight);
var intervallo_resize;
if (now_x > to_x) {
obj.style.width = Number(now_x-1)+'px';
} else if (now_x < to_x) {
obj.style.width = Number(now_x+1)+'px';
}
if (now_y > to_y) {
obj.style.height = now_y-1+'px';
} else if (now_y < to_y) {
obj.style.height = now_y+1+'px';
}
//obj.innerHTML = obj.clientWidth+" "+obj.clientHeight;
if (obj.clientWidth == to_x & obj.clientHeight == to_y) {
try {
clearInterval(intervallo_resize);
} catch (e) {alert(e);
}
alert('finito');
return;
} else {
if (is_started === true) {} else {
is_started = true;
intervallo_resize = setInterval("resize_obj('"+id_oggetto+"',"+to_x+","+to_y+")",1);
}
}
}