tag_add

Add to textbox from listbox (select option) ensure its uniqueness

CodeFunctionName
What is this?

Public

Tested

Original Work


<script type = "text/javascript" >
    function tag_add() {
        tags = document.getElementById("T").value;
        if (tags == "Tags") {tags = ""} ;
        ta = document.getElementById("TT").options[document.getElementById("TT").selectedIndex].text ;
        if (tags.search(ta) == -1) {
            document.getElementById("T").value = tags + " " + ta ;
        }
    }
</script >

Views 270

Downloads 66

CodeID
DB ID