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/15/2007 2:44:00 PM

Doogie wrote:
> Wouldn't it be just as easy (or possible anyway) to get the name of
> the column you clicked from within XSL and send that through to
> javascript (which is why I didn't ask this question in a javascript
> group)?    As you can see, the specific row that was clicked is being
> passed in, I would figure there is some way to indicate the specific
> column?

The XSLT transformation happens before any client-side events like a 
click occur and before any client-side script runs.
I am not sure what "the specific row that was clicked is being passed 
in" has to do with XSLT at all as that 
(onclick="GetDetail(this.rowIndex)") too is client-side script that does 
not in any way depend on whether the HTML document with the script is 
generated by an XSLT transformation or is a static document. As said, in 
terms of scripting you can pass in the event object to your function and 
that has a property srcElement in IE and a property target in other 
browsers, that way you will get the event target and walking up to the 
parentNode you will get the cell element (td element) if necessary which 
has a property cellIndex.



-- 

	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