I'm trying to create a dialog which shows text and image using dojo dialog widget, whenever I'm passing image details through innerhtml pop-up is not appearing either for text or image.
It works fine for text details but the image details don't show. I've included my code below:
HTML:
<div data-dojo-type="dijit.Dialog" title="SUB Details"
style="width: 500px; height: 150px; display:none;
id="subDetailDialog"
data-dojo-id="kycDetailDialog">
<br>
<table border ='0px' align='center' width='400' class='detailedInfo' id='detailedInfo' >
<tr class='even'>
<td style="width:40%"><strong>First Name</strong></td><td><strong>:</strong></td>
<td id='firstNameRow' style="width:40%"></td>
</tr>
<tr class='odd'>
<td><strong>Date of birth</strong></td><td><strong>:</strong></td>
<td id='dobRow'></td>
</tr>
<tr class='even'>
<td><strong>Subscriber Image</strong></td><td><strong>:</strong></td>
<td id='imgRow'></td>
</tr>
</table>
</div>
Javascript:
dojo.byId("firstNameRow").innerHTML = data.firstName;
dojo.byId("dobRow").innerHTML = data.dob;
dojo.byId("imgRow").innerHTML = '<img src="/images/123456789_.jpg" border="0" width="32" height="32"/>';
subDetailDialog.show();
I dont know where you have been mistaken, be sure to check if the image was successfuly loaded (in console ) ,
Another point is that you have to call the
data-dojo-ididentifier to show the dialogkycDetailDialoginstead ofsubDetailDialog.below a working snippet that may help you ( using modern dojo AMD )
Here is a fiddle if you want to test the code -> FIDDLE