Basic Tutorials

Fading text using javascript, best for advertising your offer.

Posted on October 2, 2007. Filed under: Basic Tutorials, Javascript |

<div id=”fader” style=”font:18px Arial bold;width:100%;color:rgb(255,255,255)”></div>
<script language=”JavaScript1.2″>
hexinput=255  // Initial color value.
var inc=-1 //increment variable
function fadingtext(){           
if(hexinput>0) { 
hexinput-=11; // increase color value
document.getElementById(“fader”).style.color=”rgb(“+hexinput+”,”+hexinput+”,”+hexinput+”)”; // Set color value.
setTimeout(“fadingtext()”,120); 
}
else
hexinput=255  //reset hex value
}
function changetext(){
if (!document.getElementById) return
inc++
if (inc==0)
document.getElementById(“fader”).innerHTML=”Welcome to My World”
else if (inc==1)
document.getElementById(“fader”).innerHTML=”Visit my blog…”
else{
document.getElementById(“fader”).innerHTML=”Enjoy your stay here”
inc=-1
}
fadingtext()
setTimeout(“changetext()”,4000)
}
window.onload=changetext
</script>

Read Full Post | Make a Comment ( 1 so far )

Writing your first Javascript :)

Posted on September 30, 2007. Filed under: Basic Tutorials |

Javascript is easy to write. Open your favourite text edior and save as javascript.htm
<html>
<body>
<script language=’javascript”>
    alert(“hello zaka”);
</script>
</body>
</html>
Double click the file and see the result

Read Full Post | Make a Comment ( None so far )

Starting HTML – 1

Posted on September 30, 2007. Filed under: Basic Tutorials |

Click Start -> Run -> notepad.exe
Type the following :
<html>
    <body>
        Hello Zaka
     </body>
</html>
Save the file as index.htm
Be sure to select “All Files”
Double click the file index.htm
Congrats. You have created your first html page!

Read Full Post | Make a Comment ( None so far )

Liked it here?
Why not try sites on the blogroll...