The title isn't very descriptive but I couldn't find a better one. Feel free to edit it.
Basically what I'm looking for is the best way to do the following:

When the user clicks "Add New Item", a new row is added with an indentical text box and drop down as above. The options I can think of are the following:
- Hardcode the HTML in the JavaScript code. This is obviously a hideously ugly solution.
- Assemble the HTML from DOM nodes (or jQuery objects). This is very ugly too.
- Use a client-side template system. I used one of those once and it was pretty weird (it used
<script language="html">tags to define the templates). - Make an ad-hoc client-side "template" and hide it somehow with CSS.
- Make an AJAX request to fetch the HTML. This is slow and uses server resources unnecessarily.
What do you suggest? I'm not completely satisfied with any of the above solutions.
ids (if any) and append to the parent of the current last row.