Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    HELP!!! table generator

    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......

  • #2
    Regular Coder
    Join Date
    May 2005
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Please read the Rules and Posting Guidelines

    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:
    PHP Code:
    var rows prompt('Number of Rows?'); 
    to initialize your values.

    2) Use nested for loops to create the table:
    PHP Code:
    for (var r=0r<rowsr++){
        
    //create your table row
        //append the row to the table's tbody element
        
    for (var c=0c<colsc++){
            
    //create column cells and append to the rows
        
    }



  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •