AJAX Contact Form

Want to collect input from your web site’s visitors? Don’t have time or expertise to develop the contact form yourself? Don’t worry. Dustin Diaz’s AJAX based contact form is quite easy to use. You can get the code here. I fixed couple of bugs in the original script and deployed the form at my personal website.

Happy Birthday Google.

Today is Google’s 9th birthday. Have a good one.

9th_birthday.gif

CSS Styles

Nice and simple CSS menus. 13Styles.com

Measure your hunger


hungry? very hungry?

Originally uploaded by karakola

Does it make you hungry or very hungry :)

Dynamically Change Background Image

A simple JavaScript allows you to dynamically change the background image of any element on your web page.

For example, you can change the background image when a visitor hovers mouse on a navigation link. Here is the very simple example.

<div id=”main” style=”color:white;width:260px;height:25px;background:#ffffff url(‘nav_off.gif’);” onMouseOver=”toggleImage(‘main’,’nav_on.gif’);” onMouseOut=
“toggleImage(‘main’,’nav_off.gif’);”
>Roll your mouse here to change image.
</div>


Here is the JavaScript funtion that toggles the image.

function toggleImage(id,imageName){
document.getElementById(id).style.backgroundImage=”url(‘”+imageName+”‘)”;
}


You can also use same technique to change font color, size and style.

For example;

<div id=”second” style=”color:blue;width:280px;background:#ffffff;” onMouseOver=
“toggleFont(‘second’,’red’);” onMouseOut=
“toggleFont(‘second’,’blue’);”>
Roll your mouse here to change color.
</div>

Here is the JavaScript function.

function toggleFont(id,fontColor){
document.getElementById(id).style.color=fontColor;

}

See it in action.

Follow

Get every new post delivered to your Inbox.