I suggest doing something like this:
<form id='form1' [other attributes]>
<select name='lang' onchange='checkIfOther(this.options[this.selectedIndex].value,this)'>
<option value='english'>english</option>
<option value='french'>french</option>
<option value='german'>german</option>
<option value='add'>add...</option>
</select>
<input type='submit' value='go'/>
</form>
<script type='text/javascript'>
function checkIfOther(lang,sel)
{
if(lang=="add") {
language = prompt('enter your language:','');
if(language!==false)
{
sel.options.length++;
sel.options[sel.options.length].value=language;
sel.options[sel.options.length].text=language;
}
}
}
</script>
HTH!
-Snib
<><
http://www.snibworks.com
There are only two stupid questions: the one you don't ask, and the one you ask more than once ;)