[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: onChange does not funtioning?
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|