VirtualMV/JavaScript/TableObject

Overview

 * Creating tables in JavaScript requires the use of the DOM table Object Model. As &lt;table> and &lt;tr> are read only attributes in Internet Explorer, this means you can't use innerHTML to create rows in a table. To manage this JavaScript has a DOM Table object model.

Refer to: http://www.w3schools.com/jsref/dom_obj_table.asp

Creating a Table and adding rows
For insertRow 0 = insert at the top of the table, -1 = at the bottom and a number indicates which row,

Ref: http://www.w3schools.com/jsref/met_table_insertrow.asp

Displaying in a pop-up window
{{vmv:Source| ");	winMsg.document.write(" "); }  }}

Table: Trouble shooting
Problem: When Add to Table button is pressed the row is added then the screen flashes and the row disappears.

Solution, in the code you probably have the wrong input type (type = submit). The correct type is button:

Problem:When you click [Add] a very small row may be added with no data.

Solution: Check the names in the js match the html names. Try commenting out until you find the offending one if you need to.

Problem:You get cannot read property of undefined...

Solution: Check you are using name or id correctly in form (document.myform.... = name) getElementById = id