cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Gallardo Rivera <>
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"

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

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message