how to popup submit button while selecting item from the dropdown list. i had completed the task of displaying textfield while selecting item from the dropdown list but unable to figure out how to popup the submit button with textfield while an item is selected from the dropdown list...please help me out ....itried it with all my efforts please quick....
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<script language="JavaScript" type="text/javascript">
<!--
function ShowTB(obj,id){
txt=obj.options[obj.selectedIndex].text;
if (txt.match('search By')){
document.getElementById(id).style.visibility='hidden';
}
if (txt.match('name')){
document.getElementById(id).style.visibility='visible';
}
if (txt.match('lastname')){
document.getElementById(id).style.visibility='visible';
}
if (txt.match('city')){
document.getElementById(id).style.visibility='visible';
}
}
//-->
</script>
<script language="JavaScript" type="text/javascript">
<!--
function ShowTB(obj,id){
txt=obj.options[obj.selectedIndex].text;
if (txt.match('search By')){
document.getElementById(id).style.visibility='hidden';
}
if (txt.match('name')){
document.getElementById(id).style.visibility='visible';
}
if (txt.match('lastname')){
document.getElementById(id).style.visibility='visible';
}
if (txt.match('city')){
document.getElementById(id).style.visibility='visible';
}
if (txt.match('search1')){
document.getElementById(id).style.visibility='visible';
}
}
//-->
</script>
<script type="text/javascript" language="javascript">
<!--
function validateListBox(){
var listBoxSelection=document.getElementById("type").value;
if(listBoxSelection==0){
alert("Please select a day");
return false;
}
return true;
}
-->
</script>
</head>
<body>
<form action="demo.php" method="post">
<select onchange="ShowTB(this,'fred');" name="type" id="type" >
<option value="" selected>search By</option>
<option value="name">name</option>
<option value="last">lastname</option>
<option value="city">city</option>
</select>
<br>
<input id="fred" style="visibility:hidden;"type="text" name="search" id="search"/ >
<input type="submit" value="submit"/ >
</form>
</body>
</html>