Forum Moderators: open
<form action="search_process.php" method="post">
<input id="search" style="color:#999999;" name="search" value="Search Title..." onfocus="stext()" onblur="stext()" type="text" maxlength="48" size="48" />
<select name="type" onchange="stext(this.form.type.options[this.form.type.selectedIndex].value)">
<option value="Title">Title</option>
<option value="Tags">Tags</option>
<option value="Actor">Actor</option>
</select>
<input id="submit" name="submit" type="submit" value="Find it!" />
<script type="text/javascript">
function stext(value){
var text = document.getElementById("search").getAttribute("value");
if(value === undefined){
var searchtext = 'Search Title...';
}
else if(value == 'Tags'){
var searchtext = 'Search Tags...';
}
else if(value == 'Actor'){
var searchtext = 'Search Actor...';
}
else if(value == 'Title'){
var searchtext = 'Search Title...';
}
if(text==searchtext){
document.getElementById('search').setAttribute("value","");
document.getElementById('search').setAttribute("style","");
}
else if(text==='' || text===' '){
document.getElementById('search').setAttribute("style","color:#999999;");
document.getElementById('search').setAttribute("value",searchtext);
}
}
</script>