carlbrooks Posted November 30, 2011 Share Posted November 30, 2011 Hi, I have a function where it add rows into a table. For the example below it adds a row under the Question column, (I have not included whole function as there is a lot of code so instead I have just posted the relevant code. //This is inside a function var row = document.createElement("tr"); var cell input, alertErrors = "", // Note, this is just so it's declared... qnum = 1; cell = document.createElement("td"), input = document.createElement("textarea"); cell.className = "question"; input.name = "question_" + qnum; input.value = form.questionText.value; cell.appendChild(input); row.appendChild(cell); Now my function works really well when it comes to adding a row into a table. The problem is that it works on all major browsers except for Internet Explorer. I have researched an found out that I may need to use insertRow() and insertCell() methods. I don't know how to really apply this into my code so what I want to know is that if somebody knows how to manipulate the code above to include the insertRows and insertCell methods, then can you please do this for the code above. It means I know how insertRow() and insertCell is added in the code and I can include this in all of my other columns in the function. Thank You Quote Link to comment https://forums.phpfreaks.com/topic/252120-table-adds-rows-in-all-browsers-except-for-internet-explorer/ Share on other sites More sharing options...
nogray Posted November 30, 2011 Share Posted November 30, 2011 Are you inserting the row into the table or the tbody Quote Link to comment https://forums.phpfreaks.com/topic/252120-table-adds-rows-in-all-browsers-except-for-internet-explorer/#findComment-1292740 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.