Is there a way to create and append a dijit to the end of a div? Say I have the following code:
<div id="attendants">
</div>
<button dojoType="dijit.form.Button" onClick="addPerson();">Add Person</button>
I found the following code online but this replaces my 'attendants' div:
var personCount = 0;
function addPerson() {
personCount += 1;
var attendants = dojo.byId('attendants');
var newField = new dijit.form.TextBox({id: 'newPerson' + personCount, name: 'newPerson' + personCount}, attendants);
}
and I want to dynamically add a new TextBox dijit to the div, not replace the div with a dijit.