Click to See Complete Forum and Search --> : Help: resizing an image


Jim Renkel
12-13-2002, 03:59 PM
At:

http://javascript.internet.com/miscellaneous/image-resizer-drag-and-drop.html

is a really neat script for resizing an image via drag-and-drop.

But, at least on my machine, it only works with MicroSoft's Internet Explorer, not Netscape Navigator.

Anybody know why? Is there something (in preferences?) ya gotta set just right? BTW, I'm using Navigator version 4.72, FWIW.

Any help anybody can give me with this would be greatly appreciated, both for the specific application I'm working on, and for general understanding.

ShrineDesigns
12-13-2002, 04:12 PM
NN doesn't support the "onDrag" event

gil davis
12-13-2002, 05:32 PM
NS 4.x also will not change the size of an image once it has been rendered. An image will only change it's size if 1) it is created as a percentage of a containing object (like a table, or the whole window), and the container size is changed; or 2) you use document.write() to rewrite the image tag.

Even changing the source of the image does not change the size of the actual image object.

gil davis
12-13-2002, 08:55 PM
I decided to do an image stretch demo to show that it can be done in NS4. You can see it at

http://gil.davis.home.att.net/stretch.htm

If you mousedown on the image and move (drag), the layer will grow in proportion. When you mouseup (drop), the image will snap to the size of the yellow box.

BTW, the page is not really doing a drag and drop operation, but neither was the one that you originally posted.