|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
Add dynamic headers to a html table
Hi Guys,
i am trying to add table headers of an existing table in the html based on some check boxes checked or unchecked, the scenario is , i have to create a number of columns in a table , based on the columns ( checkboxes ) selected or de-selected. please can some one help me regarding this. regards kanwar |
|
#2
|
||||
|
||||
|
im not quite sure what you mean, i do have an example of what i think you mean even though it would envolve javascript to write the table contenets...
this is what i think you mean... you want to write a variered (on access to the site) number of <TD>'s and <TR>'s , if this is true, you can use... var numofcols=5; //use a variable to set this if you want it to vary. var numofrows=4; // *same* for(var x=0;x<numofrows;x++) { document.write("<TR>"); for (var y=0;y<numofcols;y++) { document.write("<TD></TD>"); // use "\" b4 special characters to display them } document.write("</TR>"); } if you need me to explain more, let me know. colton22 |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Add dynamic headers to a html table |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|