[Zope] Help with ZPT and dynamic javascript

Vahur Rebas vahur at tpu.ee
Thu Aug 12 03:18:30 EDT 2004


hi,

can you have the second form values before first value is chosen?
you could grab second menu values into a different arrays.
if first selection is made then onselect="somefunction()" would
put the right values in a second menu.
somefunction can be in a separate file and that's pure javascript that would
fill the select menu.
theory atleast...

Vahur
ps. not sure if onselect really exist :)

>All:
>
>Here's my design problem - I have a form with two drop down menus. 
>The values of the second drop down depend on what the user selected 
>in the first. The values of both fields are dynamic - pulled from a 
>database when the form is published.
>
>I am trying to figure out how to enable this using Page Templates. 
>My thoughts are:
>1) use tal:replace to generate the script element and its contents - 
>this doesn't seem to work with Zope ignoring everything within the 
>script tags.
>
>2) use a python script and tal:replace to generate the script 
>element. This isn't working either - my suspicion is that the page 
>never processes the created script element.
>
>3) call the database directly with javascript. I have no idea how to 
>do this or if it can be done and I really don't want to do it this 
>way.
>
>4)  ??
>
>What simple clue am I missing? T
>  
>




More information about the Zope mailing list