[Javascript] OnClick rotate an image on a page 90 clock wise

DEV dev at qroute.net
Fri Jun 6 19:05:11 CDT 2003


I figured this out already.

if you have an html like this,

<div id=X><img src='a.gif'></div>

then following onClick does the trick

X.style.filter='progid:DXImageTransform.Microsoft.BasicImage(rotation=1)

you have the option 0,1,2,3 as rotate.


----- Original Message ----- 
From: "Chris Tifer" <christ at saeweb.com>
To: "[JavaScript List]" <javascript at LaTech.edu>
Sent: Friday, June 06, 2003 12:49 PM
Subject: Re: [Javascript] OnClick rotate an image on a page 90 clock wise


> I believe there's styles that can be used to rotate things, but I'd
probably
> go with a Flash File and have an object rotate in there if I had the
choice.
>
> Chris Tifer
> http://emailajoke.com
>
> ----- Original Message -----
> From: "DEV" <dev at qroute.net>
> To: "[JavaScript List]" <javascript at LaTech.edu>
> Sent: Friday, June 06, 2003 2:53 PM
> Subject: [Javascript] OnClick rotate an image on a page 90 clock wise
>
>
> > Dear list,
> > I have a sitaution I need your quick help.
> >
> > Assuming I have an image on a web page with an id of myImage. what's
> onClick
> > to turn its view to 90 clock wise,
> > as you keep clicking it will take the latest position and add another 90
> > clock wise...
> >
> > Thank you
> >
> >
> > _______________________________________________
> > Javascript mailing list
> > Javascript at LaTech.edu
> > https://lists.LaTech.edu/mailman/listinfo/javascript
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript



More information about the Javascript mailing list