Tell me more ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a jsp page in which rows are created dynamically to a table using java script. It is working fine in all the browsers except IE. In IE it is showing the error Unknown run time error..

I have attached the java script function

    function addrow(tableID) {
        try{
        var table = document.getElementById(tableID);
        var rowCount = table.rows.length;
        var row = table.insertRow(rowCount-1);


        var mystring1='<td class="formlabel"><h4>Type &nbsp;&nbsp;&nbsp;</h4></td><td class="formfield"><input type="text" name="type7" id="type8" size="30"/></td><td class="formgap"></td><td class="formlabel"><h4>Description &nbsp;&nbsp;&nbsp;</h4></td><td class="formfield"><textarea name="textarea2" id="textarea2" cols="28" rows="2"></textarea></td>';

row.innerHTML =mystring1;

    }catch(e) {
        alert(e);
    }
    }

HTML part

<table id="table1" width="792" border="0">

<tr class="rowdiv">
      <td class="formlabel"><h4>Type &nbsp;&nbsp;&nbsp;</h4></td>
      <td class="formfield"><input type="text" name="type7" id="type8" size="30"/></td>
      <td class="formgap"></td>
      <td class="formlabel"><h4>Description &nbsp;&nbsp;&nbsp;</h4></td>
      <td class="formfield"><textarea name="textarea2" id="textarea2" cols="28" rows="2"></textarea></td>
      </tr>

      <tr class="rowdiv">
        <td width="170" class="formlabel">&nbsp;</td>
        <td class="formfield">&nbsp;</td>
        <td class="formgap"></td>
        <td class="formlabel">&nbsp;</td>
        <td class="formfield"><h6 onclick="addrow('table1')">Add policy</h6></td>
      </tr>

    </table>

I could not post my question in stack overflow, Can anyone please help me to post it in stack overflow?????

share|improve this question
"I could not post my question in stack overflow" - I am inquiring about a remedy for this case and will be in contact as soon as I have more information. I will leave this question open pending further information. – danlefree Feb 2 '12 at 8:38
@danlefree, I searched in meta.. They are telling person with 2k reputation can do it otherwise flag the question and moderators can do it... – Sarin Jacob Sunny Feb 2 '12 at 8:41
I just tried it with your other question and the question was closed as "off topic" without any further options for migration. – danlefree Feb 2 '12 at 8:43
Grt.......... :-( – Sarin Jacob Sunny Feb 2 '12 at 8:49
@danlefree Is it allowed for you to reopen the question and migrate it???? – Sarin Jacob Sunny Feb 2 '12 at 8:58
show 1 more comment

closed as off topic by danlefree Feb 2 '12 at 10:22

Questions on Webmasters Stack Exchange are expected to relate to webmastering within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

Browse other questions tagged or ask your own question.