www.webdeveloper.com
Results 1 to 2 of 2

Thread: how to create dynamic table

  1. #1
    Join Date
    Jul 2005
    Posts
    13

    how to create dynamic table

    ............
    I'm implemeting a simple function where when a user click on a button, a new table will be displayed on the form, and if the user click on the second time, second one will display and so on. no recordset data require......

    thanx....

  2. #2
    Join Date
    Jan 2005
    Location
    Los Angeles, CA
    Posts
    4,887
    Untested (note: I write flawless JavaScript code 95% of the time)

    Code:
    <head>
    <script type="text/javascript">
    var rowCount=0
    var HTMLPart1="<font color='royalblue'>This is row "
    var HTMLPart2"<\/font>\n<br>"
    
    function addRow(){
    var el=document.getElementById("writeLayer")
    rowCount++;
    el.innerHTML+=HTMLPart1+rowCount+HTMLPart2
    return true
    }
    
    </script>
    </head>
    <body>
    <input type="button" value="add row" onclick="return addRow()">
    <br>
    <div id="writeLayer"></div>
    </body>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles