RE: HTML DOM Question About Table Size

  • From: "Homme, James" <james.homme@xxxxxxxxxxxx>
  • To: "programmingblind@xxxxxxxxxxxxx" <programmingblind@xxxxxxxxxxxxx>
  • Date: Wed, 23 Mar 2011 06:53:52 -0400

Hi,
Since I have control over the whole thing, I'm just going to give everything an 
i d attribute and forget that twisted stuff. I found that solution after I 
posted.

Thanks.

Jim

From: programmingblind-bounce@xxxxxxxxxxxxx 
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Ken Perry
Sent: Tuesday, March 22, 2011 9:44 PM
To: programmingblind@xxxxxxxxxxxxx
Subject: RE: HTML DOM Question About Table Size

Ok to get the last column and row is a bit twisted.  If you're on the element 
that is the table element you can find the last row by doing this.

Elem.rows.length;

Now if you're looking for the longest columns last cell you have to loop 
through all the rows and find the longest then check the last cell but if your 
only looking for the last row  and last column then it would look like this.

Elem.rows[elemn.rows.length].cells[elem.rows[elem.rows.length].cells.length]

Now I didn't test this but I know I have the logic right.

ken

From: programmingblind-bounce@xxxxxxxxxxxxx 
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Homme, James
Sent: Tuesday, March 22, 2011 3:04 PM
To: programmingblind@xxxxxxxxxxxxx
Subject: HTML DOM Question About Table Size

Hi,
In Word, the cell and row information is available to screen readers, which is 
why they can tell you that you are in the last row and last cell of a table. 
This question isn't screen reader specific. If you are coding a web page, can 
you get a script to figure out whether you are in the last row and last cell of 
a table or not? If so, what properties do you check out?

Thanks.

Jim

________________________________
This e-mail and any attachments to it are confidential and are intended solely 
for use of the individual or entity to whom they are addressed. If you have 
received this e-mail in error, please notify the sender immediately and then 
delete it. If you are not the intended recipient, you must not keep, use, 
disclose, copy or distribute this e-mail without the author's prior permission. 
The views expressed in this e-mail message do not necessarily represent the 
views of Highmark Inc., its subsidiaries, or affiliates.

Other related posts: