Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 11-08-2009
Member
 
Join Date: Apr 2009
Posts: 87
Page break between table rows in html

I am looking for program in html language, The program contain three rows for displaying employee data and name and id. The page must break between table rows and column should display employee address.
Reply With Quote
  #2  
Old 11-08-2009
Member
 
Join Date: May 2008
Posts: 2,293
Re: Page break between table rows in html

This will display employee data with two rows and 1 column:
Code:
<table border="2">
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
<tr>
<td>row 3, cell 1</td>
<td>row 3, cell 2</td>
</tr>
</table>
Reply With Quote
  #3  
Old 11-08-2009
Member
 
Join Date: Jan 2009
Posts: 199
Re: Page break between table rows in html

Code:
<HTML>  
<HEAD>  
           function addRow(empID) { 
  
            var tab = document.getElementById(empID);  
  
            var rowCount = tab.rows.length;  
            var row = tab.insertRow(rowCount);  
  
            var cell1 = row.insertCell(0);  
            var element1 = document.createElement("input");  
            element1.type = "checkbox";  
            cell1.appendChild(element1);  
  
            var cell2 = row.insertCell(1);  
            cell2.innerHTML = rowCount + 1;  
  
            var cell3 = row.insertCell(2);  
            var element2 = document.createElement("input");  
            element2.type = "text";  
            cell3.appendChild(element2);  
  
        }  
  
        function deleteRow(empID) {  
            try {  
            var table = document.getElementById(empID);  
            var rowCount = table.rows.length;  
  
            for(var i=0; i<rowCount; i++) {  
                var row = table.rows[i];  
                var chkbox = row.cells[0].childNodes[0];  
                if(null != chkbox &amp;&amp; true == chkbox.checked) {  
                    table.deleteRow(i);  
                    rowCount--;  
                    i--;  
                }  
  
            }  
            }catch(e) {  
                alert(e);  
            }  
        }  
  
    </SCRIPT>  
</HEAD>  
<BODY>  
  
    <INPUT type="button" value="Add Row" onclick="addRow('dataTable')" />  
  
    <INPUT type="button" value="Delete Row" onclick="deleteRow('dataTable')" />  
  
    <TABLE id="dataTable" width="350px" border="1">  
        <TR>  
            <TD><INPUT type="checkbox" name="chk"/></TD>  
            <TD> 1 </TD>  
            <TD> <INPUT type="text" /> </TD>  
        </TR>  
    </TABLE>  
  
</BODY>  
</HTML>
Source : viralpatel.net
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Page break between table rows in html"
Thread Thread Starter Forum Replies Last Post
How to break rows in Excel 2007 connoisseur MS Office Support 2 17-02-2012 06:22 PM
Page Break lines are blocked under Page Break Preview in Microsoft Excel connoisseur MS Office Support 2 17-02-2012 02:09 PM
Cannot highlight distinct cells in different rows and column in a Pivot table ? Grayson Windows Software 3 27-11-2010 05:25 AM
HTML page table width not working in Firefox Ground 0 Software Development 4 23-08-2010 06:56 PM
How to create div around table rows Rock Villa Software Development 3 27-07-2009 01:18 PM


All times are GMT +5.5. The time now is 12:36 AM.