how to replace a hard coded value with a variable?
<p>I want to replace the hard coded string "Categories" with a variable. How can I do that?
Instead of having Categories all the time, the word Categories may be replaced by the value held by a variable id, <code>var id</code>.</p>

<pre><code>$(this).closest('ul').append('&lt;li&gt;&lt;input type="hidden" name="Categories.Index" value=' + newValue + ' /&gt;&lt;input type="text" value=""  name="Categories[' + newValue + '].Name" style="width:280px"/&gt;&lt;input type="hidden" value=""  name="Categories[' + newValue + '].ID" style="width:280px"/&gt;&lt;input type="button"  value= "Add" /&gt; &lt;/li&gt;');
</code></pre>
