My code contains the following markup
<div class="ms-Grid">
<div class="ms-Grid-row">
<div class="ms-Grid-col"><span id="firstName" class="ms-fontSize-l"></span></div>
<div class="ms-Grid-col"><span id="lastName" class="ms-fontSize-l"></span></div>
</div>
</div>
I'm using Office.context.ui.displayDialogAsync to display the HTML page.
What I would like to do is set the text with jQuery.
$('#firstName').text("a-name")
I already know how to retrieve my data from our database using a Web Service.
The question is, can the dialog box displayed by displayDialogAsync be updated dynamically? If so, where would the code go? (e.g. before or after the call to displayDialogAsync, or perhaps inside of an initialize function (document, or Office)
In case anyone is having the same problem I did. Here is what my final sample code looks like.
The above Html is called from this Javascript file which I got from a GitHub Sample Dialog Sample
openDialog shows one use of displayDialogAsync.