[Zope] ZPT/ZSQL Two drop down menus

Simon Forster simon-lists at ldml.com
Fri Mar 11 05:29:13 EST 2005


On 11 Mar 2005, at 02:57, Etienne Desgagné wrote:

> Hi,
>
> In a ZPT, I have a form with two drop down menus (address and street) 
> and submit
> button. The values of the second drop down (adresse) depend on what 
> the user
> selected in the first (street).
> The values of both list come from ZSQL method.
>
> Is it possible to catch the value of the selection of the first drop 
> down list
> (with the onChange event?) and pass it as argument to the ZSQL method 
> of the
> second list.

Yes. Two methods:

1) Load up all the data into a Javascript array and let it do the 
lifting. I have an old example of this at 
<http://www.ldml.com/downloads/popup3/>. This has 3 conditional popups 
but you can knock out the 3rd popup.

2) Use iFrames. You use a Javascript function to call a remote page. I 
set one up years ago for a client and have forgotten the details. See 
<http://developer.apple.com/internet/webcontent/iframe.html> for 
further info.

HTH

Simon Forster
_____________________________________________________
  LDML Ltd, 62 Pall Mall, London, SW1Y 5HZ, UK
  Tel: +44 (0)870 1999 780   Fax: +44 (0)70 9230 5247
_____________________________________________________


More information about the Zope mailing list