Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 8th, 2008, 09:16 AM
Authorized User
Join Date: Sep 2008
Location: Oslo, , Norway.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to peirix
Default counting columns

Hi. I'm trying to figure out how to count number of <col />-tags inside the document. The reason I need to count them, is that the pages will be generated, and there is no way of knowing how many columns there will be, or what their id-tag will be.

var testObj = document.getElementById("colGroup").childNodes;
returned a very high number, so I guess that's no good.

I will also need to find out how to access the id-tag

sample code:

<colgroup id="colGroup">
   <col span="2" id="date" />

   <col id="win32" />
   <col id="win32_md_debug" />
   <col id="win32_md_release" />
   <col id="win32_mt_debug" />
   <col id="win32_mt_release" />

   <col id="ubuntu32" />
   <col id="ubuntu32_release" />

   <col id="solaris32" />
   <col id="solaris32_release" />

   <col id="osx32" />
   <col id="osx32_release" />

   <col id="centos64" />
   <col id="centos64_release" />

   <col id="gentoo64" />
   <col id="gentoo64_release" />


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting Dates Odifius Access VBA 2 September 26th, 2006 02:22 PM
counting in XSL gezi XSLT 8 March 29th, 2006 06:50 PM
Node counting sarahl2 XSLT 2 February 21st, 2006 02:25 PM
record counting keyvanjan Classic ASP Databases 0 June 30th, 2005 01:20 AM
Counting ?!? hcweb Classic ASP Basics 2 December 8th, 2003 05:08 PM

All times are GMT -4. The time now is 08:27 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.