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/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/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
