I found this project to insert TAGS into a form, but it just adds the TAG when enter key, and when that happens on my form it already sends! I would like to know what I should do in SCRIPT so that it adds the TAG every time I enter comma or semicolon ....
SCRIPTCode:
<script>$(document).ready(function(){$('#addTagBtn').click(function(){$('#tagsoption:selected').each(function(){$(this).appendTo($('#selectedTags'));});});$('#removeTagBtn').click(function(){$('#selectedTagsoption:selected').each(function(el){$(this).appendTo($('#tags'));});});$('.tagRemove').click(function(event){event.preventDefault();$(this).parent().remove();});$('ul.tags').click(function(){$('#tags-field').focus();});$('#tags-field').keypress(function(event){if(event.which=='13'){if($(this).val()!=''){$('<liclass="addedTag">' + $(this).val() + '<span class="tagRemove" onclick="$(this).parent().remove();">x</span><input type="hidden" value="' + $(this).val() + '" name="tags[]"></li>').insertBefore('.tags .tagAdd');
$(this).val('');
}
}
});
});
</script>