Convert this small PHP script into JavaScript
Hello,
I'm having troubles converting this PHP script into JavaScript
function ResizeImage($image ,$width ,$height)
{
//image resizer by myscripting
//get the size of the original
$size = GetImageSize($image);
//divide the width / height percentage by 100
$new_width = 100 / $width;
$new_height = 100 / $height;
//store the resized dimensions in a variable
$sizeh = $size[1]/ $new_height;
$sizew= $size[0]/ $new_width;
//display the new resized image
$new_image = "<img src = \"$image\" height=\"$sizeh\" width =\"$sizew\">";
echo $new_image;
}
What im trying to do is beable to resize an image in a DHTML layer onMouseover using the above function ResizeImage("1.gif",50,50);
Please help.
Thanks,
-Flint