Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - change attribute? [Thread Next] Re: change attribute?To: NULL Date: 8/2/2004 8:35:00 PM You're saying HTML Dom. html example instead of xml may be easy. Your resultant html, <table> <tr> <td>1</td> <td><button onclick='test'>click</button></td> </tr> </table> In that case, the first <td> is <button>'s parent's previousSibling. So event code like this.parentelement.previousSibling.innertHtml=2 will do. "Mr. Applications" <nice_guy@i...> wrote in message news:e1dmtAkbEHA.2760@T...... > Hi, > > I'm new here and I'm trying to display an html page based on XML+XSL. > In the HMTL: Im loading the XML and XSL and using: > document.write(xml.transformNode(xsl)); > > with the XSL I display a table with all the XML elements and here is my > problem - I'm trying to add another column to the table, that will have a > <input type="button"> with onclick event that will change an attribute of an > XML element in the current table row.....Is this possible? The following > code shows the value of the attribute that I want to change, but I don't > know how to change it, let's say from "0" to "1". > > <td> > <input type="button" value="button"> > <xsl:attribute name="onclick">alert(<xsl:value-of > select="TITLE/@nId"/>) > </xsl:attribute> > </input> > </td> > > Thanks. > > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
