Hi, I've that code : <dtml-let TEST="'dir'"> <dtml-in "portal_catalog.searchResults(Type='Cas clinique', review_state='published', sort_on='Date', sort_order='reverse')" size=1 end=1> <dtml-var id> </dtml-in> </dtml-in> <script type="text/javascript"> var image = 0; var delai = 2000; var icone = new Array (); var lelien = ''; var max = <dtml-var "compte_images(repertoire='/uv/web/cnr/cas/&TEST;',prefixe='Ima-') - 1">; I need to get the value returned by the <dtml-var id> in the function called "compte_images" and in some others later in the code. My question : I need something like a global variable, that I may use here and there. But, infortunately, I don't know how to write it. Anyone knows it ? Thank you PS -------------------------------------------------- Oreka ! Nous sommes l'internet moins cher ! Surfez 25% moins cher avec http://www.oreka.com
Hi Pascal, In the dtml-in loop you can set the variable in the request by using <dtml-call "REQUEST.set('varname', _.getitem('sequence-item').id)"> <dtml-in "portal_catalog.searchResults(Type='Cas clinique', review_state='published', sort_on='Date', sort_order='reverse')" size=1 end=1> <dtml-call "REQUEST.set('cas_clinique_id', _.getitem('sequence-item').id)"> </dtml-in> And then you can use it in the script section by using <dtml-var cas_clinique_id> Hope that helps. Best, Leon de Heus. Op Mon 26-11-2001, om 16:18 schreef Pascal Samuzeau:
Hi,
I've that code :
<dtml-let TEST="'dir'"> <dtml-in "portal_catalog.searchResults(Type='Cas clinique', review_state='published', sort_on='Date', sort_order='reverse')" size=1 end=1> <dtml-var id> </dtml-in> </dtml-in>
<script type="text/javascript">
var image = 0; var delai = 2000; var icone = new Array (); var lelien = ''; var max = <dtml-var "compte_images(repertoire='/uv/web/cnr/cas/&TEST;',prefixe='Ima-') - 1">;
I need to get the value returned by the <dtml-var id> in the function called "compte_images" and in some others later in the code.
My question : I need something like a global variable, that I may use here and there.
But, infortunately, I don't know how to write it.
Anyone knows it ?
Thank you
participants (2)
-
Leon de Heus -
Pascal Samuzeau