Skip to main content

Posts

Showing posts from November 28, 2010

writing text upside down

¡ʎןsnoǝuɐʇןnɯıs ǝpoɔ ǝʇıɹʍ puɐ puɐʇspuɐɥ uɐɔ ı ʍou
Use the code below to create a tool to write text upside down!
Demo available here :
http://mishraprince.blogspot.com/p/flip-text.html


<html><head><title>Flip Text » Write Upside Down Text</title>

        <script type="text/javascript">

        // JavaScript Document
function tweet(){
    var flipped = document.f.flipped.value;

}

function flip() {
var result = flipString(document.f.original.value);
document.f.flipped.value = result;
        document.getElementById('tweet').href = "http://twitter.com/home?status="+result;
}

function flipString(aString) {
aString = aString.toLowerCase();
var last = aString.length - 1;
var result = "";
for (var i = last; i >= 0; --i) {
result += flipChar(aString.charAt(i))
}
return result;
}

function flipChar(c) {
if (c == 'a') {
return '\u0250'
}
else if (c == 'b') {
return 'q'
}
else if (c == 'c') {
return …