JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 29th, 2006, 05:47 PM
kanwar_daman kanwar_daman is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 1 kanwar_daman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 2 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old September 1st, 2006, 05:37 PM
colton22's Avatar
colton22 colton22 is offline
\ ^_^ / - *Local Friend*
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Location: near chicago, Illinois
Posts: 469 colton22 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 1 h 36 m 37 sec
Reputation Power: 13
Send a message via AIM to colton22 Send a message via MSN to colton22 Send a message via Yahoo to colton22
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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Add dynamic headers to a html table


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap