Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Reference a column name in xsl from within JavaScript >Thread Next - Re: Reference a column name in xsl from within JavaScript Re: Reference a column name in xsl from within JavaScriptTo: 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/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
