wanye
09-30-2002, 06:10 AM
hi all, how do i actually get a value from textfield and add it on as an new option value in the drop down list menu...?? how to do that ?? i need help on that badly.... thx..
glenngv
09-30-2002, 06:16 AM
<html>
<head>
<script language=javascript>
function addOption(sel,item){
sel.options[sel.options.length] = new Option(item,item);
}
</script>
</head>
<body>
<form name=frm>
<select name=s>
</select><br>
<input name="t">
<input type="button" value="Add" onclick="addOption(this.form.s,this.form.t.value)">
</form>
</body>
</html>
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.