cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Gallardo" <agalla...@agsoftware.dnsalias.com>
Subject Re: XSP : integrate javascript
Date Thu, 01 May 2003 21:42:49 GMT
Joerg Heinicke dijo:
> 1. IMHO this has nothing to do in the XSP. XSP is on the generator level
>  and should not care about view handling.

Yes, I agree but this is just one idea of how get it work. I tought he
needed to include some javascripts for some events. This is just one
example.
>
> 2. It can be simplified to <xsl:copy-of select="@onchange"/>.

Thanks, for the tip :-)

Antonio Galardo
>
> 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




---------------------------------------------------------------------
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