How I can make a Search field like a HOTMAIL Search Bing.
In which search button is inside a search field and there is a Bing image in search field and also when i click in search field, bing disappear. image is attached.
thanks in advance...

<form action="blabla google blabla get the url from webmnaster tools blabla" method='get'>
<input type='text' style="background:url('searchtheweb.jpg');" onfocus='style="background:none;";'>
<input type='submit' value='Search' >
</form>

see the attached image

google MSN(bing) and yahoo have a bunch of html buttons to do just that on their webmaster gadgets pages

its working and showing picture but when I click picture does not disappear.

onfocus='style="background:none;";

its working and showing picture but when I click picture does not disappear.

onfocus='style="background:none;";

my javascript is not perfect, sorry
try

onfocus='this.style.background="none";'

not perfect = not good at all

Thanks . now on focus is working.

Please Tell me how I can use onfocus with class. I use class and Exteranl CSS file. now How image will disppaer when focus?

<input name="myusername" type="text" value="Enter Your Username" class="textfield_effect" id="myusername" onfocus="this.value=''" />
.textfield_effect { background:url('searchtheweb.jpg'); }
.textfield_effect:focus { background:none; }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.