[Zope] Indirect variable references

Timothy Grant tjg@avalongroup.net
Wed, 03 Feb 1999 15:09:30 -0800


Hi,

I'm going to try this one again with--hopefully--a little more clarity on
my part.

I am working on a Zope application that builds a page based on the contents
of two Tiny Tables
The first table provides categories, and the second provides detail for
each category.

DTML works beautifully to allow me to build the page. The code is as follows:

      <!--#in PriceCategories-->
        <tr>
          <td>
            <B><!--#var Category--></B>
          </td>
          <td>
            <select name="<!--#var Category-->" size=1>
              <!--#in "PriceTable(PriceGroup=_['Category'])"-->
                <option><!--#var Description-->
                <!--#call "REQUEST.set('cost',Cost)"-->
              <!--#/in-->
            </select>
          </td>
          <td>
          </td>
        </tr>
      <!--#/in-->  

As you can see the code builds a number of select boxes that are named with
the names that are contained in the first Tiny Table.

After the form has been submitted, I need a way of accessing the contents
of those select variable names, and I cannot figure out how to do it.

e.g., if the Tiny Table contains Fred, Ethel, Ricky and Lucy, I will get
four select boxes named Fred, Ethel, Ricky and Lucy. It works fabulously,
even though I knew it should work, I was still pumped when I looked at the
HTML and saw what a nice job had been done.

So after submission, Fred, Ethel, Ricky and Lucy all contain the value of
what was selected. How do I programatically or should that be DTMLmatically
access those values from within another #in construct?

Thanks for any assistance.
-- 
Stand Fast,
	tjg.
===================================
Timothy J. Grant				tjg@avalongroup.net
Avalon Technology Group			www.avalongroup.net
(503) 246-3630 voice                              	
(503) 246-3124 fax			    	

This message may be digitally signed with PGP. A PGP signature 
guarantees that this message really did come from me. For more 
information regarding digital signatures and encryption, please 
contact me.