I wanna zoom images with the mouse wheel!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Internet explorer has a cool feature that allows to zoom in and out of images
with the mouse wheel:

http://msdn.microsoft.com/workshop/samples/author/dhtml/refs/onmousewheelEX.htm

But unfortunately this feature has to be activated through javascript. But I
want IE to zoom images opened directly in IE, not those embedded in some html
code. In other words, I want to go to www.bla.com/bla.gif and start zooming
in and out of the image using the mouse wheel. Is it possible? Is there maybe
some 3rd party IE extension that extends this IE feature, allowing it to be
used on standalone images?
 
Semjon said:
Internet explorer has a cool feature that allows to zoom in and out of images
with the mouse wheel:

http://msdn.microsoft.com/workshop/samples/author/dhtml/refs/onmousewheelEX.
htm

But unfortunately this feature has to be activated through javascript. But I
want IE to zoom images opened directly in IE, not those embedded in some html
code. In other words, I want to go to www.bla.com/bla.gif and start zooming
in and out of the image using the mouse wheel. Is it possible? Is there maybe
some 3rd party IE extension that extends this IE feature, allowing it to be
used on standalone images?
 
There is a way to realise the zooming using bookmarklets:

First bookmarklet:

javascript:('<img id=oImage src=' + location.href + '
onmousewheel=Picture()>')

second one:
javascript:('<img id=oImage src=' + location.href + '
onmousewheel=Picture()>')

javascript:var count = 10; function Picture() { count = Counting(count);
Resize(count); return false; } function Counting(count){ if
(event.wheelDelta >= 120) count++; else if (event.wheelDelta <= -120)
count--; return count; } function Resize(count){ oImage.style.zoom =
count + '0%'; }

When both bookmarklets are applied on an IE instance in which an image is
loaded, you can zoom it with the mousewheel.

Unfortunately this requires the execution of both bookmarklets one after
another, which takes too long. Does anybody know how to combine both
bookmarklets into one? So that only one has to be executed in order to enable
the zoom feature?
 
err, sorry, made a mistake in the previous post.

first bookmarklet:

javascript:('<img id=oImage src=' + location.href + '
onmousewheel=Picture()>')


second one:

javascript:var count = 10; function Picture() { count = Counting(count);
Resize(count); return false; } function Counting(count){ if
(event.wheelDelta >= 120) count++; else if (event.wheelDelta <= -120)
count--; return count; } function Resize(count){ oImage.style.zoom =
count + '0%'; }
 
Is there maybe some 3rd party IE extension that extends this
IE feature, allowing it to be used on standalone images?

The IE5 Web Accessory Zoomin (which is implemented as a script)
can do this. It is activated by an extension to the right-click menu.

You would have to figure out if you could adapt that to be activated
by your mousewheel.


Search:

http://www.google.com/search?q="web+accessories"+zoomin+site:microsoft.com


Also search this newsgroup for some fixes to these tools
as documented by Jim Byrd:

http://groups.google.com/groups?q="[email protected]&rnum=1


HTH

Robert Aldwinckle
 
Yesm I know about the IE5 web accessory powertoy, but it's something
different. anyway, it's not the best in its class. The best IE rightclick
zoom extension is IE Zoomer.

Anyway, I finally managed to create a fully working bookmarklet:

---------------
javascript:
(function(i){with(document){for(i=0;i<images.length;++i){with(images){with(style){void(zoom='100%',onmousewheel=function(){
if ((parseInt(zoom)>=10)&&(event.wheelDelta >= 120))
window.status=zoom=parseInt(zoom)+event.wheelDelta/12+'%'; if
((parseInt(zoom)>10)&&(event.wheelDelta < 120))
window.status=zoom=parseInt(zoom)+event.wheelDelta/12+'%'; })}}}}})()
 
Back
Top