faqts : Computers : Programming : Languages : JavaScript : Images

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

12 of 56 people (21%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

How can I flip (rotate) an image 90 degrees using an onclick event?

Apr 4th, 2002 06:17
Jean-Bernard Valentaten, Jason Barrentine,


I'm afraid js doesn't support any graphic options, but of course there 
is a workaround.
All you need to do is to save the picture you want to rotate, rotated 
by 90 degrees as a spare file and exchange the picture onclick.
Of course this means that you'll need more space on the webserver and 
this increases traffic too, since you'll need to preload the rotated 
picture.
HTH,
Jean