Jquery Fails to dynamically create a series of cross-browser

I have this function for my comment system but it doesn’t dynamically add the row…
This is what it looks like:

var myTable = $("#adddatacom"+id);
var magicNewRow = document.createElement('tr');
magicNewRow.htmlContent = '<td class="comments"><table><tr><td width="600px"><table><tr><td><?php echo $userimg2; ?></td><td><b><a href="profile.php">You</a>,</b><b style="color:green"> just now</b><br>'+ comMessage.val() +'</td></tr></table></td>';
magicNewRow.innerHTML = '<td class="comments" id="newcomm"><table><tr><td width="600px"><table><tr><td><?php echo $userimg2; ?></td><td><b><a href="profile.php">You</a>,</b><b style="color:green"> just now</b><br>'+ comMessage.val() +'</td></tr></table></td>';
myTable.append(magicNewRow);
This entry was posted in Codes & Scripts and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>