Unfortunately I will not be able to provide links for this. I have a table that is displayed on the page. A user can press a button to added information to the database which in turn adds a new row to the table. I'm using AJAX to create the row without having to refresh. This works perfectly, finally.
This is what one of the rows looks like. The class attribute works fine when the page loads but doesn't seem to work when I add the rows with AJAX. I use it to open a fancy popup box if the user clicks the image.
Here is the code that I use to create the row and the columns.
I hope you can understand this. Any help would be much appreciated.
col4.innerHTML = "<a href='../actions/administrators_edit_form.php?adminID=" + adminID + "&keepThis=true&TB_iframe=true&modal=true' class='thickbox'><img src='../images/edit.gif' border='0'></a> <a href='../actions/administrators_delete.php?adminID=" + adminID + "&rw=" + rowCount + "&keepThis=true&TB_iframe=true&modal=true&width=250&height=75' class='thickbox'><img src='../images/cross.gif' border='0'></a>";
This is what one of the rows looks like. The class attribute works fine when the page loads but doesn't seem to work when I add the rows with AJAX. I use it to open a fancy popup box if the user clicks the image.
Here is the code that I use to create the row and the columns.
var newRow = parent.document.getElementById("theTable").insertRow(rowCount);
newRow.style.backgroundColor=rowColor;
var col1 = newRow.insertCell(0);
col1.setAttribute("align", "center");
I hope you can understand this. Any help would be much appreciated.