Re: [Zope] How to retrieve the selection list

2001-01-08 Thread Diny van der Donk

At 13:01 9-1-01 +0800, Angietel wrote:
>The following is my selection list, where should i put the custcountry> in order to display the selected result.
>  
You don't have to, as soon as one option is selected you're variable
custcountry gets the value from  and the text
between  and  is being displayed.

Canada
^ ^

If you have you're countries in a database you can let sql generate an
option list in stead of typing all the options. Something like this:


  
  
  


Where select_country is a sql-method like:

select
country_field
from COUNTRY

Regards,

Diny


>
>
>Please select a country
>  
>Australia
>Cambodia
>Canada
>China
>Colombia
>[...]
>United States
>
>Thank You!
>


DIVA, Faculty of Veterinary Medicine
Utrecht University,  The Netherlands
http://www.vet.uu.nl 

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] How to retrieve the selection list

2001-01-08 Thread Curtis Maloney

On Tuesday 09 January 2001 16:01, Angietel wrote:

> > The following is my selection list, where should i put the  custcountry> in order to display the selected result.
>

Ooh... this one hurts.. (o8

You have to put "SELECTED" on the 'option' tag you want to be default.
This means iterating over your list with something like:


   SELECTED 
value="">


If you don't already have the country list in an object somewhere, I 
recommend adding a "lines" type property to either that object, or an 
appropriate folder, and put them in there.


And remember... if "custcountry" doesn't exist.. this will break... do 
putting a:


  


at the top of the page won't hurt.

> 
>
> Please select a country
>
> Australia
> Cambodia
> Canada

8< *snip* >8

> 
>
> Thank You!


Have a better one,
Curtis Maloney.

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] How to retrieve the selection list

2001-01-08 Thread Angietel



The following is my selection list, where should i 
put the  in order to display the selected 
result.
 
    
Please select a 
country
 
AustraliaCambodiaCanadaChinaColombiaDenmarkFranceGermanyGreeceGreenlandHong Kong S.A.R.IcelandIndiaIndonesiaItalyJapanKoreaKorea, North Macau S.A.R.MalaysiaUnited KingdomUnited 
States
Thank You!