cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Gallardo Rivera <agalla...@agsoftware.dnsalias.com>
Subject Re: Fw: bug with javascript ?
Date Thu, 29 Aug 2002 09:41:28 GMT
Another thing you can do is put the JavaScript in a another file and call it 
from the XSL. This is my way to kept the most of JavaScript out of the XSL.

Let said you have the JavaScript in a file called: myscript.js.

You can include it into the XSL with a sentence like:

<script language="JavaScript"
	type="text/javascript"
	src="resources/myscript.js"/>

Where,
src is pointing to the file you want to include.
**********************************************************************************
If you are trying to call a function with a string parameter, do something 
like this:

<a href="javascript:void(0);"
	onclick= "return myfunction(&apos;{@an-atribute}&apos;,"
	onmouseout="return anotherfunction();">

Here myfunction need and parameter written in this format:

'string' (please see the apos)

The apos must be changed by this:    &apos;

Antonio Gallardo

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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