[Zope] passing object from dtml to python script

Luby Liao liao@acusd.edu
Mon, 14 May 2001 16:11:41 -0700 (PDT)


Is it possible to pass objects in a dtml, such as a row of the result
set of a sql query, into a python script used as a form handler?

As an example, on line 9, 'complete_or_not' is a python script with
one argument.  I would like to pass an object x (line 2) into the
script.  But the syntax of line 9 is incorrect.  I could effectively
pass x in using hidden fields.  But I hope I can avoid that.  Any help
is greatly appreciated.  cheers, Luby


 1	 <dtml-if email>
 2	  <dtml-let x=emailSearch>
 3	    <dtml-if "_.len(x)==1">
 4		<dtml-in x>
 5		  If you are <dtml-var firstname> <dtml-var lastname>, please 
 6	            proceed to complete the registration, by clicking the
 7			'complete' button.  Otherwise, click the 'not me'
 8			button.
 9		   <FORM METHOD="POST" ACTION="complete_or_not(x)>" NAME="complete" onSubmit="return verifyInput()">
10		   <TABLE border="0" cellpadding="0"><TR><TD align="right">
11		   <INPUT TYPE="submit" NAME="complete" VALUE="Complete"></TD><TD align="right">
12		   <INPUT TYPE="submit" NAME="not_me" VALUE="Not Me"></TD></TR>
13		   </TABLE>
14		   </FORM>
15		 </dtml-in>
16	    </dtml-if>
17	   </dtml-let>
18	 </dtml-if>

--
Luby Liao, Department of Math/CS, University of San Diego, San Diego, CA 92110
(619)260-4021(O), (619)452-7644(H), (619)260-4293(fax)

   'Twas brillig, and the slithy toves    Did gyre and gimble in the wabe:
   All mimsy were the borogroves    And the mome raths outgrabe   -- L.C.