View Single Post
Old 04-16-2011, 11:36 PM   PM User | #6
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Quote:
Would somebody post the actual complete code to show me?
Homework.. ?!

JavasScript doesn't use 'Dim' - that's Visual Basic - it uses 'var'.

The following demonstrates a looping structure:
Code:
function createRows(noOfRows) {
    var x;
    for (x=0; x < noOfRows; x++ ) {
        // obtain or calculate principal, period, etc..
        // add a row to the table, 
        // inserting the principal, etc., into the correct cells as you go
        // (you already have some code that inserts a row)
    }
}
AndrewGSW is offline   Reply With Quote