0

hi guys, could you help me?
how could i create a dropdown button automatically once a value is inputted in the textbox..

thanks thanks..

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by Shanti C
0

First try to google and start coding.. Then any problem occur come here for suggestions..Not for doing your home work..

try this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
function add_val()
{
  ival=document.getElementById('ivalue').value;
  test.testselect.options[test.testselect.options.length]=new Option(ival,ival);
  document.getElementById('ivalue').value="";
}
//-->
</SCRIPT>

<form action="" method="post" name="test">
<br>
<select name="testselect">
<option>One</option>
</select><br>
<br>
<input type="text" name="ivalue" id="ivalue" value="">
<br>
<br>
<input type="button" name="submit" value="submit" onClick="add_val();">
<br>
</form>
</BODY>
</HTML>
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.