[Zope] dtml-in, dtml-var, javascript and keeping quotes

Richard Rosenberg richrosenberg at earthlink.net
Sat Sep 11 19:59:46 EDT 2004


Hello All:

Is there a format code (or other way) to do the following:

<script language="JavaScript">

var myArray = new Object();
<dtml-in somelist_of_strings prefix="sl">
myArray[<dtml-var sl_item>]=<dtml-var anotherlist_of_strings[sl_index]>
</dtml-in>

</script>

Specifically, I am interested in whether there is a way to force <dtml- 
var> to
render the quotes, assuming both somelist_of_strings and
anotherlist_of_strings are both variables available through the REQUEST
object. Right now I have to enclose each dtml-var tag inside double  
quotes,
and while it works, it's kind of messy and screws things up when it  
comes to a
different data type. Any suggestions are appreciated.





More information about the Zope mailing list