Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
05-17-2013, 04:58 PM #1
- Join Date
- May 2013
- Thanked 0 Times in 0 Posts
I have a problem when trying to hide some <td> cells using javascipt.
The problem I have is that my table is being produced by XSLT using <xsl:apply-templates select="Data/DataRow" /> to create the rows. This means that all of the rows have the same ID and therefore I cannot use getElementByID.
<table> <tr> <td> Client Name </td> </tr> <xsl:apply-templates select="Data/DataRow" />
I have tried the below with no luck.
cells2 = table.getElementsByTagName('td').getElementById('colid');
05-17-2013, 08:51 PM #2
Well, your template is faulty, because of course multiple occurrences of the same ID are illegal HTML.
So perhaps you need to just use relative row and cell numbers?
or similar?Code:var cellX = table.rows.cells;
Would help if you showed the template.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.