Dynamic javascript using JQuery?
<p>My code is as follows:</p>

<pre><code>&lt;script&gt;

$(document).ready(function() {

    var tagCounter=0;

    $("#tag-add-button").click(function () {
      var text = $("#tagadd").val();
        $("#set-tags").append("&lt;input type='text' id='tag"+tagCounter+"' READONLY&gt;");
      $("#tag"+tagCounter).val(text);
        $("#tagadd").val("");
        tagCounter++;
    });


});
&lt;/script&gt;
</code></pre>

<p>This does the following: </p>

<p>When tag-add-button is clicked, it takes the text from the inputbox (tagadd) and puts it in a new inputbox thats appended to the set-tags div. The tagadd inputbox is then made blank. </p>

<p>The problem I'm having, is I want each input box to have its own remove button. But I don't see how the javascript can be generated for that when there can be an unlimited number of input boxes...</p>

<p>Any ideas?</p>
