Re: [Zope] REQUEST object - obtaining variables from

2001-01-15 Thread Lee

Hi there,

Thanks for your help. I'm currently using the following code, which works perfectly;

dtml-in expr="REQUEST.form.items()"
  dtml-let text="_['sequence-key'] + 'x' + _['sequence-item']"
  dtml-call expr="updateDB(text)"
  /dtml-let
/dtml-in

Randy's response provided the following code, which didn't work nor did any variation
on it. Surprising as it 'appears' to be doing almost the same thing as above(?).

dtml-in expr="REQUEST.form.items()"
dtml-in expr="updateDB(text=_['sequence-key'] + 'x' + _['sequence-item'])"
   dtml-var result
/dtml-in
/dtml-in

Cheers,

Lee

[EMAIL PROTECTED] wrote:

 On Sat, Jan 13, 2001 at 06:11:08PM +, Lee wrote:
 You have indeed overlooked something.  There are tons of things in REQUEST
 unrelated to your form.

 To simply display the entire request, put
 tml-var REQUEST
 in display/index_html

 To access the value of name1 in display/index_html,
 you can use many forms:

 dtml-var REQUEST['name1']

 dtml-var name1#may get something else if name1 is NOT in REQUEST

 dtml-with REQUEST
   dtml-var name1
 /dtml-with

 dtml-in ('name1', 'age1', 'name2', 'age2')
   dtml-var "REQUEST[_.['sequence-item']]"
 /dtml-in

--
Lee Reilly
mailto:[EMAIL PROTECTED]

````

HAVE SKILLS; WILL TRAVEL.

I'm currently looking for an internship in the USA
in the field of web development. Ideally, I'm looking
for a placement for 3 to 18 months. Can you help?

More details, my resume, etc. @
http://homepages.strath.ac.uk/~aeu97172/

/shameless plug




___
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] REQUEST object - obtaining variables from

2001-01-13 Thread Lee

Hi,

I am having some problems with the REQUEST namespace/object. I
understand that if I submit form data then it can be retrieved using the
REQUEST object. I have looked at Chapter 7 (Advanced DTML) for support
but I'm still no closer to success.

I have a DTML method, which passes an unknown number of arguments with
unknown names to another method. For example,

form action="display"
Name input type="text" name="name1"br
Age input type="text" name="age1"br
Name input type="text" name="name2"br
Age input type="text" name="age2"br
input type="submit"
/form

I would like the display method to simply show each of the variable's
names and values i.e. iterate through each variable in the REQUEST
object. Maybe I've overlooked something in the Zope documentation but
could someone supply a useful snippet of code to get me started?

Thanks very much,

Lee

--
Lee Reilly
mailto:[EMAIL PROTECTED]

````

HAVE SKILLS; WILL TRAVEL.

I'm currently looking for an internship in the USA
in the field of web development. Ideally, I'm looking
for a placement for 3 to 18 months. Can you help?

More details, my resume, etc. @
http://homepages.strath.ac.uk/~aeu97172/

/shameless plug




___
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] REQUEST object - obtaining variables from

2001-01-13 Thread Jens Vagelpohl

here's how you could display the form variables on the receiving object:

tested

dtml-in expr="REQUEST.form.items()"
  dtml-var name="sequence-key": dtml-var name="sequence-item"br
/dtml-in

/tested

REQUEST.form will contain all the fields from the form and
REQUEST.form.items() will give you access to all key-value pairs that you
can then access with sequence-key and sequence-item in the loop.

jens




on 1/13/01 13:11, Lee at [EMAIL PROTECTED] wrote:

 Hi,
 
 I am having some problems with the REQUEST namespace/object. I
 understand that if I submit form data then it can be retrieved using the
 REQUEST object. I have looked at Chapter 7 (Advanced DTML) for support
 but I'm still no closer to success.
 
 I have a DTML method, which passes an unknown number of arguments with
 unknown names to another method. For example,
 
   form action="display"
   Name input type="text" name="name1"br
   Age input type="text" name="age1"br
   Name input type="text" name="name2"br
   Age input type="text" name="age2"br
   input type="submit"
   /form
 
 I would like the display method to simply show each of the variable's
 names and values i.e. iterate through each variable in the REQUEST
 object. Maybe I've overlooked something in the Zope documentation but
 could someone supply a useful snippet of code to get me started?
 
 Thanks very much,
 
 Lee


___
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 )