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 3:39:00 PM

Doogie wrote:
> I understand that there is probably a way to do this inside javascrpt
> passing in the event target like you mentioned.  But, my question was
> if there is a way to do it in the "onclick="GetDetail(this.rowIndex)"
> line inside the xsl.  What I meant by "the specific row that was
> clicked is being passed in" is that the "this.rowIndex" value
> indicates the specific row the user clicked.  I was thinking that if
> we can do that so easily, there must be a way to do something like
> "this.colIndex" or "this.colRow".  That seems much easier to do (and
> less code) then to try to send an object over to java and then parse
> it out there.  I will certainly attempt to do that, but thought if
> there was an easier way to do this, that I would try that first.

That onclick="GetDetail(this.rowIndex)" has nothing to do with XSLT, it 
is client-side script in the HTML the XSLT generates. You seem to insist 
to overlook that difference.
In
   <tr onclick="GetDetail(this.rowIndex)"
the this object is a HTMLTableRowElement object which has a property 
named rowIndex. It does not have any properties like colIndex or 
cellIndex as that is a property that HTMLTableCellElement objects have. 
I have outlined how to find a cell from the event object. And a cell 
then has a property cellIndex
   <http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-80748363>
which you can use.

-- 

	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