I'm trying to create a tag like routine for music genres. I have an array with various music genres in it. Those genres appear in a select box so they can be added to a text area...
The problem is, I want to be able to add multiple genres instead of a new value replacing the old value.
Heres sample code of what I have so far ...
<?php
$tagarray = array ('Classical', 'Pop', 'Blues');
?>
Tags: <select name="tagmenu">
<option value="#">Select Tags</option>
<?php
foreach($tagarray as &$value){
echo '<option value="'.$value.'">'.$value.'</option>'."\n";
}
?>
</select>
<input value="Add" type="button" onClick="document.form1.tags.value=document.form1.tagmenu.options[document.form1.tagmenu.selectedIndex].value;">
<br />
<textarea class="small" name="tags" rows="5" cols="40" wrap="virtual"></textarea>
Is there some subtle thing in "onCLick" I can change to get it to append the value?, ideally comma separated :-/