Subject: Re: [xsl] onChange does not funtioning? From: nenad@xxxxxxxxxxxxxxx Date: Thu, 15 May 2008 20:51:24 +0200 |
Mikul, OK, I guess problem is there because I do conditional transformation like when paramexample > 0 <form action="Default.aspx" runat="server"> ... Here I display content </form> when paramexample2 = 0 <form action="Default.aspx" runat="server"> ... Here I display content </form> else <form action="Default.aspx" runat="server"> ... Here I display content </form> so I guess it is unknown which form. I also tried with name or id attributes but no changes ----- Original Message ----- It seems, you are generating wrong value of onChange attribute (which cannot trigger a form submit). I think, you need to do: <xsl:attribute name="onChange">document.forms[0].submit()</xsl:attribute> (if there is a single form in the page) or, <xsl:attribute name="onChange">document.formName.submit()</xsl:attribute> (if you know the form by name) Your problem does not seem at the XSLT level. It seems to be at the HTML level. On 5/15/08, nenad@xxxxxxxxxxxxxxx <nenad@xxxxxxxxxxxxxxx> wrote: > Hi, > I have: > > <form action="Default.aspx" runat="server"> > > > <select name="SelectCategories"> > <xsl:attribute name="onChange">form.submit()</xsl:attribute> > <xsl:for-each select="document('../content/en//categorycodes.xml')/catcodes/category"> > <option> > <xsl:attribute name="value"> > <xsl:value-of select="@code"/> > </xsl:attribute> > > <xsl:value-of select="."/> > </option> > </xsl:for-each> > </select> > > > > </form> > > onChange is not reacting. > Should I use javascript instead? > Thanks > Nenad -- Regards, Mukul Gandhi
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] onChange does not funtion, Mukul Gandhi | Thread | Re: [xsl] onChange does not funtion, XSL-List Owner |
Re: [xsl] <xsl:copy-of select="." /, John Ericson | Date | Re: [xsl] <xsl:copy-of select="." /, John Ericson |
Month |