Hi ,
i am running into Javascript -Unknown runtime error whereever i use innerHTML .
I have a function generate_top_pane() which includes JS and HTML to create form.
I have textbox and buttons in it ,and submit-button goes to ajax server to get data.
There is a results table create in same code with id='Resultstable'.Submit button causes AJAX call to fetch the data to populate the table.
Data is coming but not able to add rows to existing table.
My code---
function generate_top_pane()
{
form_String+=.....
+" <input name=\"Submit\" type=\"button\" value=\"Submit\" class=\"button\" onClick=\"submitPickupRuleForm/B;\">"
<table id='headersTable'>...
...
.....+ "</table>"
+"<div class=\"scroll_bar\" style=\"width:100%; height:100%; z-index:1; class: overflow: auto; visibility: visible; background-color: #f0f0f0; layer-background-color: #f0f0f0; border: 1px none #000000;\">"
+"<table id='ResultsTable' border=\"0\" align=\"center\" width=\"98%\">";
}
function submitPickUPruleForm() //call to ajax
{
document.getElementById('ResultsTable').innerHTML+= "<tr>"
//display checkbox and image
+"<td>"
+ruleName
+"</td>"
}//end -if
} //end-for loop
document.getElementById('ResultsTable').innerHTML+= "</table>";
}
Is there any way ican debug the error .
alert on InnerHTML returns <tbody><tr></tr></tbody>