Doorknob Doorknob - 1 year ago 78
Javascript Question

Add new rows/columns to a table

I have this code already:

for (i=0;i<names.length;i++) {
var row = document.createElement('tr');
var col = document.createElement('td');

This is in Javascript. It does not seem to be adding anything to my table (which has an ID of
. What is wrong? And yes, I do intend to just make rows of text in a table.

Answer Source

You should inverse the two script tags : always load your libraries before any other scripts that uses them.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download