xsl-list
[Top] [All Lists]

Re: [xsl] onChange does not funtioning?

2008-05-15 11:52:33
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(_at_)njconsulting(_dot_)de <nenad(_at_)njconsulting(_dot_)de> 
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--