Maintaining passing the same dtml-var through several dtml docs
Hi, I am trying to pass the same variable through several dtml docs. The first doc lets you select from pull down menus and the next dtml doc takes this information and inserts the data into the proper field in the database. My next doc is a form for the users to fill out. I keep getting the same error messages about the variable key error or not globally define (after I try something). I have read Dieter's Chap 3 section (very good stuff) and it tells me the object is probably empty. Again, I know I have a syntax error. This is the text that insert the data: <form> <body bgcolor="#FFFFFF" text="#000000"> <p><a href="add_part_num">Back to Create Part Number Page</a></p> <dtml-call "REQUEST.set('part_num',st1+st2+st3+st4+st5+st6+st7)"> <p><dtml-var part_num> This is the new part number created. <dtml-call expr="create_part_num(REQUEST)"> <p><a href="part_number_form">Fill out Part Number Information</a></p> </form> It is my favorite part_num problem again. Thanks. Larry McDonnell Proton Energy Systems 50 Inwood Rd. Rocky Hill, CT 06067 (860) 571-6533 ext. 531 Email:lmcdonnell@protonenergy.com www.protonenergy.com
McDonnell, Larry writes:
.... passing values between requests .... I have read Dieter's Chap 3 section (very good stuff) and it tells me the object is probably empty. It does not say this. Instead, it says something like:
A new REQUEST object is created for each new Web request. It does not know anything about the content of previous REQUEST objects. The easy way to pass values around requests are session objects (see Zope Book). There is a caveat: they do not play well with the browser history. Thus, visitors may get confused when they use "back in history/forward in history". The more painful way are hidden variables (for forms) or URL parameters (for links).
Again, I know I have a syntax error. This is the text that insert the data:
<form> <body bgcolor="#FFFFFF" text="#000000"> <p><a href="add_part_num">Back to Create Part Number Page</a></p> <dtml-call "REQUEST.set('part_num',st1+st2+st3+st4+st5+st6+st7)"> <p><dtml-var part_num> This is the new part number created. <dtml-call expr="create_part_num(REQUEST)"> <p><a href="part_number_form">Fill out Part Number Information</a></p> </form> Hmmm. I cannot see a syntax error. At least, not a DTML/Python one ( the HTML is invalid: "body" cannot occur inside "form").
Dieter
participants (2)
-
Dieter Maurer -
McDonnell, Larry