PDA

View Full Version : How would i go about doing this..



LRH
12-07-2006, 11:27 AM
I know how to resize an image with JS... but im wondering how i would go about overwriting the original image with the newely resized image... if that makes sense lol.


Thanks in advance, Ash

12345c
12-07-2006, 11:59 AM
document.getElementById('id_of_image').src='url_of_new_image';

LRH
12-07-2006, 12:08 PM
Thanks very muchly, will try that out :D

Twey
12-07-2006, 02:53 PM
Or document.images['id_of_image'].src = "url_of_new_image"; for slightly better support in old browsers and less to type :)