I have a js like below:
var html=""
$.getJson("getRelatedDynamicFields.json", { ajax: 'true'}, function (data) {
switch(data[0].ReferenceType) {
case "Table1":
html += '<jsp:include page="Page1.html">';
break;
case "input":
html += '<input id="' + data[0].id + '" type="text"/>';
break;
.
.
.
}
}
$('#myDiv').html(html);
the second case works find, but the first case doesn't. I get the page with error and not loaded completely. how should I do this?