[Zope-dev] HowTo: trying to acces only the form elements in the REQUEST ...

2001-03-13 Thread Holger Lehmann

Hello everyone,

I need a quick hint.

How do I check wether there are any "form" elements in the request.
And how can I only acces those ?
I want to pass those, and only thos on to a ZClient call to another website. 

I do have a request like this:
http://server/foo/bar?name=barparam=fooparam2=baz

Now I want to isolate name, param and param2.
I need to construct a request like this:
dtml-if any parameters at all
  dtml-in all form parameters in REQUEST
. do something
  /dtml-in
/dtml-if

TIA Holger

-- 
---
catWorkX GmbH
Dipl.-Ing. Holger Lehmann
Stresemannstr. 364
22761 Hamburg
Tel: +49 (0700) catWorkX
Tel: +49 (40) 890 646-0
Fax: +49 (40) 890 646-66
mailto:[EMAIL PROTECTED]
http://www.catworkx.de
http://www.catbridge.de



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] HowTo: trying to acces only the form elements in the REQUEST ...

2001-03-13 Thread Siggy Brentrup

Holger Lehmann [EMAIL PROTECTED] writes:

 Hello everyone,
 
 I need a quick hint.
 
 How do I check wether there are any "form" elements in the request.
 And how can I only acces those ?
 I want to pass those, and only thos on to a ZClient call to another website. 
 
 I do have a request like this:
 http://server/foo/bar?name=barparam=fooparam2=baz
 
 Now I want to isolate name, param and param2.
 I need to construct a request like this:
 dtml-if any parameters at all
   dtml-in all form parameters in REQUEST
 . do something
   /dtml-in
 /dtml-if

Some hints to play with (tested on 2.3.0):

dtml-if "REQUEST.form"
  dtml-var "REQUEST.form"br
  dtml-var "REQUEST.form.keys()"br
  dtml-var "REQUEST.form.values()"br
  dtml-var "REQUEST.form.items()"br
  dtml-in "REQUEST.form.items()"
brdtml-var sequence-index: dtml-var sequence-key=dtml-var sequence-item
  /dtml-in
dtml-else
  No parameters given!
/dtml-if

Regards
  Siggy

-- 
Siggy Brentrup - [EMAIL PROTECTED] - http://www.winnegan.de/
** ceterum censeo javascriptum esse restrictam ***


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] HowTo: trying to acces only the form elements in the REQUEST ...

2001-03-13 Thread Chris McDonough

dtml-if "REQUEST.form"
   dtml-if "REQUEST.form.has_key('bar') and REQUEST.form.has_key('baz')"
 ... do something...
   /dtml-if
/dtml-if

- Original Message -
From: "Holger Lehmann" [EMAIL PROTECTED]
To: "Zope devel list" [EMAIL PROTECTED]
Sent: Tuesday, March 13, 2001 3:33 AM
Subject: [Zope-dev] HowTo: trying to acces only the form elements in the
REQUEST ...


Hello everyone,

I need a quick hint.

How do I check wether there are any "form" elements in the request.
And how can I only acces those ?
I want to pass those, and only thos on to a ZClient call to another website.

I do have a request like this:
http://server/foo/bar?name=barparam=fooparam2=baz

Now I want to isolate name, param and param2.
I need to construct a request like this:
dtml-if any parameters at all
  dtml-in all form parameters in REQUEST
. do something
  /dtml-in
/dtml-if

TIA Holger

--
---
catWorkX GmbH
Dipl.-Ing. Holger Lehmann
Stresemannstr. 364
22761 Hamburg
Tel: +49 (0700) catWorkX
Tel: +49 (40) 890 646-0
Fax: +49 (40) 890 646-66
mailto:[EMAIL PROTECTED]
http://www.catworkx.de
http://www.catbridge.de



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )