[Zope] Filling a drop-down menu with SQL data (Problem with ar
Wed, 23 May 2001 14:41:29 +0100
I have been trying and trying the whole day but I still have not found any
solution to my (simple?) problem:
=> I want to fill my HTML DropDown menu with data from a SQL table.
My SQL Method (sqlShowTypes) takes one argument which I have defined in
the Z SQL Method Properties as "TypeName". The function is as follows:
SELECT Typ FROM <dtml-if expr="TypeName=='Researcher'>
When testing this method seperatly from the calling dtml document it works
fine. After specifing a TypeName Parameter it returns all the rows from
Now, in my DTML Document I have a Variable "Typ" (either containing 'Researcher'
or 'Management'). This one I want to pass to sqlShowTypes as the TypeName
My first try was:
<dtml-in expr="sqlShowTypes('<dtml-var Typ>')"> : not working (Bad Request,
Error Value: ['Typname'])
<dtml-in expr="sqlShowTypes(TypName='<dtml-var Typ>')"> : somehow working
but my drop-down menu is filled with 5 empty spaces!
<dtml-in expr="sqlShowTypes(TypName=Typ)" : again, somehow working but
again EMPTY SPACES!
I would need a proper statement that would embedd just fine in my drop-down
<option> <dtml-var sequence-item>
If you are that Zope Guru I'm so badly in need of, please help me with that
PS.: "sequence-item" is the proper one to use in the code above, right?
Thanks a lot,
Der clevere Infobote - Shopping-Tipps bequem abonniert. Jetzt neu bei http://www.epost.de