cesare@planningsrl.it wrote:
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.
make that <dtml-var CreaJScriptInserimentoAnnuncio> The dtml-call doesn't include your script, it just calls it Rik