473,513 Members | 2,693 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to flip horizontally an image with JavaScript

Hi.

I'd like to flip horizontally an image with JavaScript. Is it
possible? Thank you very much.

Aug 6 '07 #1
6 15718
Francesco Moi wrote on 06 aug 2007 in comp.lang.javascript:
I'd like to flip horizontally an image with JavaScript. Is it
possible? Thank you very much.
No.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Aug 6 '07 #2
VM
You're probably better off just doing an image swap, using two images, one
being a flipped copy of the original

"Francesco Moi" <fr**********@usa.comwrote in message
news:11**********************@g4g2000hsf.googlegro ups.com...
Hi.

I'd like to flip horizontally an image with JavaScript. Is it
possible? Thank you very much.

Aug 6 '07 #3
Thomas 'PointedEars' Lahn said the following on 8/6/2007 2:47 PM:
Francesco Moi wrote:
>I'd like to flip horizontally an image with JavaScript. Is it
possible?

It is, for example:

function flipImg(img)
{
img.src = "right-left.png";
}

<img src="left-right.png" alt="..."
onmouseover="flipImg(this)">

You might want to try to preload the second image.
That doesn't "flip" anything, it swaps images which is not what the OP
asked for.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 6 '07 #4
On Aug 6, 10:27 am, Francesco Moi <francesco...@usa.comwrote:
I'd like to flip horizontally an image with JavaScript. Is it
possible?
In IE, you can use the flipH filter:
<img src="xxxx" style="filter:flipH">

Aug 7 '07 #5
jim
here is a working svg demo:
http://developer.mozilla.org/present...007/photos.svg

grab the black corner of an image (appears when you hover) and rotate
and/or scale it

Aug 7 '07 #6
In comp.lang.javascript message <11*********************@e9g2000prf.goog
legroups.com>, Mon, 6 Aug 2007 18:38:56, scripts.contact
<sc*************@gmail.composted:
>On Aug 6, 10:27 am, Francesco Moi <francesco...@usa.comwrote:
>I'd like to flip horizontally an image with JavaScript. Is it
possible?

In IE, you can use the flipH filter:
<img src="xxxx" style="filter:flipH">
Agreed.

That can be used as a body style too, and with flipV; in IE6. But when
one tries to tab over the controls, they seem to be unmoved. Clicking
on buttons works, but clicking in test input areas does not. Is that a
bug or two?
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/- FAQish topics, acronyms, & links.
Plaintext, quoting : see <URL:http://www.usenet.org.uk/ukpost.html>
Do not Mail News to me. Before a reply, quote with ">" or "" (SoRFC1036)
Aug 7 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
2766
by: eric | last post by:
I am attempting to create <A HREF> links to <A NAME> targets in a series of extremely wide web pages composed of tables with text and images sitting side by side. This is a failure since both...
2
14133
by: John Ramsden | last post by:
I have a form containing a table whose cells include prompt text strings and input areas, one of which is a textarea. These are specified using only percent values, and I use some simple...
9
62504
by: puzzled | last post by:
I'm trying to use a small gif of a Christmas tree as a horizontal divider across the screen (which could be any number of pixels wide). My attempt at doing this was basically like this: <img...
0
1292
by: Mr. A | last post by:
I'm looking for a code to flip a window, like in the Tiger - Apple OS. I though of the following algorithm but I can get it implemented right: 1. Capture the window who is about to be flipped....
1
1862
by: Valdimar | last post by:
Hi I have a little problem, i need a javascript that can change 3 images at the same time. That is i have an image , that has to change ven i hold my mouse over it + 2 other images has to change...
5
2624
Gregos
by: Gregos | last post by:
Remember I'm new at this... My webpage: http://www.geocities.com/gregos_39/gregos/gregpage.html My code: <html> <head> <title>Gregos Apple/Mac Help Page</title> <link href="home_style.css"...
2
10307
by: as | last post by:
Hi folks, am a newbie in C++ world. Normally I use matlab more often. But right now I want to create a Rising Edge D Flip-Flop model which has two Digital inputs, i.e. INPUTDATA and a CLOCK. The...
1
1850
by: mb | last post by:
I know this sounds strange, but I have set up a dataview with a fixed header, so the header does not scroll up with the rows of data. However, I need the header to scroll horizontally (not...
16
3551
by: Stan The Man | last post by:
I'm a CSS novice trying unsuccessfully to make three thumbnail images display horizontally instead of vertically. I suspect I'm missing something really stupid but I'll take the flak if someone...
0
7257
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7157
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7379
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7521
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5084
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
455
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.