PDA

View Full Version : help in flipping ...



AlienStar
01-27-2011, 12:41 PM
hello everybody
i need to flip the page as google translator does when translate from Latin languages to Arabic for example

before translating :

http://img403.imageshack.us/img403/6223/25357224.jpg

after

http://img207.imageshack.us/img207/2904/21735765.jpg

can anybody help me to do that ???

thanks

venegal
01-27-2011, 12:44 PM
You will want to set the CSS property 'direction' to 'rtl'.

AlienStar
01-27-2011, 12:46 PM
thanks for reply

I found this code can flip the direction but it's just for specific text

and I couldn't make it for the whole page



<html>
<head>
<title>direction</title>
</head>
<body>
<a href="/" onmouseover="mouseover1();">ltr</a>
<a href="/" onmouseover="mouseover2();">rtl</a>
<p id="id1">direction</p>
</body>
<script type="text/javascript">
function mouseover1() {
document.getElementById("id1").style.direction = "ltr";
}
function mouseover2() {
document.getElementById("id1").style.direction = "rtl";
}
</script>
</html>

venegal
01-27-2011, 01:29 PM
document.getElementsByTagName('body')[0].style.direction = 'rtl'

AlienStar
01-27-2011, 01:45 PM
thanks so so much it works well