View Full Version : Right-Clicking Graphics
07-08-2004, 03:43 AM
I'm new to all of this so thanks ahead to anyone that can help :)
I need to know if it's possible to manipulate an image on a web page so that whenever you right click the image you have the ability to rotate the image.....like mirror it. I'm willing to learn if someone just points me in the right direction, but a given code would be nice to...Thanks again!!
07-08-2004, 04:52 AM
Hi there CarlaN1,
and a warm welcome to these forums :D
What is wrong with left clicking like this....
alt="dogs" title="click and double-click"/>
....or mouseover like this...
alt="dogs" title="mouseover and mouseout"/>
I need to know if it's possible to manipulate an image on a web page so that whenever you right click the image you have the ability to rotate the image.....like mirror it.
JS has no in-built graphics processing capabilities such as can be found in Java, Perl or PHP.
but, i suspect, you can use JS to call functions which invoke special filters which can transform images on the fly without recoursing to loading other images. if that's possible, then it's probably M$ only functionality. you could probably find out how to do it by visiting here: http://msdn.microsoft.com/dhtml.
then again, the method coothead has posited is perhaps the best way, since it'll work in any browser. it also means you get more control over the quality of the graphics themselves.
one thing i would suggest tho, is not to take away the browser's right click functionality by intercepting the event and superimosing your own functionality on it. as a user, i'd find that annoying and would probably end up authoring a bookmarklet to eschew it and restore the usual contextmenu.
hope that all makes sense to you :)
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.