Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Reference a column name in xsl from within JavaScript

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 6/16/2007 6:25:00 PM

Doogie wrote:

> I'm not disagreeing with your comment on the client-side script.  I'm
> just indicating that inside that specific line, there is a way to
> access the row and I would think there would be a very similiar way to
> access the column.  Based on your statement on the
> HTMLTableRowElement,it would appear that is not the case (although I
> am not sure where I create that object as I don't see it directly
> created anywhere in my HTML or XSL).  It just strikes me as odd that I
> can't get access to the column in the same way I get access to the row
> (albeit in a different object).

When you author
   <tr onclick="yourFunction(this.rowIndex);">
then the browser calls the onclick handler and sets the this object to 
the tr element object.
If you want to access the cell then you need to put an onclick handler 
on each cell e.g.
   <td onclick="yourFunction(this.cellIndex);">
But in general it is easier to put the event handler on a parent element 
and then use the event object and its properties srcElement respectively 
target and then walk the parentNode hierarchy till you find a cell.


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent