[Zope] Rif: RE: [Zope] JScript objects
cesare@planningsrl.it
cesare@planningsrl.it
Mon, 10 Jan 2000 15:28:31 GMT
>Including JScript/JavaScript code in DTML documents/methods works. What
>does the script look like and what is the surrounding HTML/DTML?
Sorry for the delay in the answer but I have been out few days.
The script look like this:
<script language=JavaScript>
function ds_onChange()
{
var ga;
var flag;
// Cycle through action lists for the select
this.actionManager.executeActions(this.currentList,
this.options[this.selectedIndex].text);
// loop through all groups
for(var g in dsm.groups)
{
ga = dsm.groups[g].split(",");
flag = false
for(var i=0; i < ga.length; i++)
{
if(ga[i] == this.alias)
flag = true;
else if(flag)
{
var s = dsm.dynamicSelects[ga[i]];
s.actionManager.executeActions(s.currentList,
s.options[s.selectedIndex].text);
}
}
}
}
.....some other jscript functions......
</script>
I declared a dtml-method CreaJScriptInserimentoAnnuncio wich contains the
jscript code.
Then i called the <dtml-call CreaJScriptInserimentoAnnuncio> in my
dtml-method containing some othe dtml and html code.
What made I wrong?
Thank you,
Cesare
Cesare Raoss
Planning srl
Via Bolzano 45
38014 Gardolo (TN)
cesare@planningsrl.it
http://www.planningsrl.it