cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: XSP : integrate javascript
Date Thu, 01 May 2003 12:44:04 GMT
1. IMHO this has nothing to do in the XSP. XSP is on the generator level 
and should not care about view handling.

2. It can be simplified to <xsl:copy-of select="@onchange"/>.

Joerg

Antonio Gallardo wrote:
>>Is there an easy way to insert javascript on buttons (like OnClick or
>>OnMouseOver actions) into an XSP page?
> 
> Yes, you can use XSL that can helps you to do that.
> 
> For example: here is a tag <text> that can be used to define a textbox
> 
> <xsl:template match="text">
>   <input type="text" name="{@name}" size="{@size}" value="{@value}">
>     <xsl:if test="@onchange"> <!-- If there is onchange, add it! -->
>       <xsl:attribute name="onChange">
>         <xsl:value-of select="@onchange"/></xsl:attribute>
>       </xsl:if>
>     </input>
>   </xsl:template>
> 
> Usage from a XSP:
> 
> <text name="id" size="10" value=""
>   onchange="my_func(var1, var 2)">
> </text>
> 
> Best Regards,
> 
> Antonio Gallardo
> 
>>thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message