Q:

Displaying set value in text box

So I've got a problem.
I've created a text box like that:
 <input type="text" id="search" name="search" class="myText" value="Search for a keyword" onclick="value=''"/>

My problem basically is that after I press the text box to write a text of my own, and then press some other place on the screen, the value I set at start (Search for a keyword) will not be displayed once again.
I've tried everything. How do I make it display again once I've pressed some other place on the screen?

A:

Get rid of the onclick="value=''
You are basically saying, empty the box whenever I click on it.
If you can use html5, you can use:
<input type="text" id="search" name="search" class="myText" placeholder="Search for a keyword" />

And you can style it as well:
<style type="text/css">
    ::-moz-placeholder {color:#ddd;}
    ::-webkit-input-placeholder {color:#ddd;}
    :-ms-input-placeholder {color:#ddd;}
</style>

