Forum Discussion
I do something very similar.
var technical_review_checklist =
"<html>" +
"<tbody><tr>" +
"<td width=\"80%\"><span style=\"font-weight: bold;\"Checklist Item</span></td>" +
"<td width=\"80%\"><span style=\"font-weight: bold;\"Y/N/NA</span></td>" +
"</tr>" +
"<tr>" +
"<td> 7. The level of detail in the document is suitable for this phase of development.</td>" +
"<td></td>" +
"</tr>" +
"</tbody></table>" +
"</html>"
Sorry about the text, it doesn't show properly when I use a code block.
Anyway, it works properly when I use it to pre-fill the field as a Form Event, but gets weird when I use it to replace the text as a Field Event.
The first "table" tag is missing, but I guess you reduced the code sample for this post.
srcElement is typical for field events and as far as I know contains the field context itself. It´s like "this" for fields.
What exactly do you replace? Do you re-render the complete html table with the same code?
I assume you use a html element for your custom table. What code do you use to write the table content itself?
Something like document.getElementById("mytable").innerHTML/innerText = tableStuff ?
And check in the browser debugger how the table looks like in native html. Maybe you find some hints for any missing tags or similiar.