1

I'm using an html web resource on a custom entity form to display some information on save of the record. The javascript that runs on save is a web resource on the form. The javascript runs fine until it reaches the function that is supposed to actually print the information to the html web resource. Here is that code for reference:

function showQuestions(questionArr) {
var count = questionArr.length;
for (var i = 0; i < count; i++) {
var x = document.getElementById("templateRow").cloneNode(true);
x.id = "";
x.style.display = "";
x.innerHTML = x.innerHTML.replace(/{id}/, questionArr[0]);
var t = document.getElementById("qTable");
var rows = t.getElementsByTagName("tr");
var r = rows[rows.length - 1];
r.parentNode.insertBefore(x, r);
}
}

The code fails on the first document.getElementByIdcall because the javascript is referencing the entity form, but I need it to be referencing the html page that is embedded in the form.

My question is: How do I reference the html web resource that is embedded on the form so I can update it? Any help is appreciated. Thanks.

Slappy White
  • 79
  • 1
  • 12

0 Answers0