[Zope-CMF] Thanks and another question...

Braun Brelin bbrelin@yahoo.com
Thu, 20 Mar 2003 06:04:31 -0800 (PST)


First I want to thank all of the people who responded
to my saving state question with Zope.  Those answers
were extremely helpful. 

Now I have one more question.  I want to integrate TAL
and JavaScript.  I want, for instance to be able to
define a variable using TAL (tal:define="foo bar")
and use variable foo in a JavaScript statement. 
like document.write("foo = " + foo)

I've looked for examples, but the only one I've found,
in the Zope Cookbook, doesn't seem to work correctly. 
In fact, I get a syntax error when I try and use it. 

I tried doing something like the following:

<div tal:define="foo 3"
     tal:content="structure string: 
     <script = 'JavaScript' type='text/JavaScript'
        document.write("foo = " + ${foo});
     </script>
     ">Dummy Text
     </div>

This however, doesn't work.  I just get a blank
screen. 

Anyone done anything like this before? 

Thanks, 

Braun Brelin


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com