View Full Version : HELP!!! table generator

Nov 10th, 2006, 09:20 AM
Hi there if someone could help i would really apreciate it.I am looking for a table generator that works with prompts. Something like this the first prompt asks How many rows? second prompt How many columns? third prompt Border size fourth prompt Bgcolor and fifth prompt Create table... If someone could help me out with source code i will be very grateful....I really need this because its part of a take home quiz my friend and i are stuck and we need to hand this in by monday once again i would be rally grateful if someone could help......

Nov 10th, 2006, 05:22 PM
Please read the Rules (http://www.codingforums.com/rules.htm) and Posting Guidelines (http://www.codingforums.com/postguide.htm)

Esp. the part about not posting a homework assignment.

Did you at least try to write some code? If so, post what you've got and we'll help. If not, try something like this:

1) Use code similar to:
var rows = prompt('Number of Rows?');to initialize your values.

2) Use nested for loops to create the table:

for (var r=0; r<rows; r++){
//create your table row
//append the row to the table's tbody element
for (var c=0; c<cols; c++){
//create column cells and append to the rows