PHP expert |
|
function img_resize(new_width)
{
var ratio;
var new_height;
var old_width = document.getElementById('img_open').style.width;
var old_height = document.getElementById('img_open').style.height;
ratio = old_width/old_height;
new_height = new_width/ratio;
document.getElementById('img_open').style.height = new_height+'px';
document.getElementById('img_open').style.width = new_width+'px';
}
function img_resize(new_width) { var ratio; var new_height; var old_width = document.getElementById('img_open').style.width; var old_height = document.getElementById('img_open').style.height; ratio = old_width/old_height; new_height = new_width/ratio; document.getElementById('img_open').style.height = new_height+'px'; document.getElementById('img_open').style.width = new_width+'px'; }
Zou het moeten doen |