Re: [Zope] Can ZPT form call a url?

2005-05-24 Thread Dieter Maurer
James O'Keefe wrote at 2005-5-23 22:36 -0400:
We would like to expand on that form such that a user can enter their email
address and zip code which we would log to our database and then call the url 
to
subscribe the person in the mailman list.

The easiest way it to perform a redirect.

Unfortunately, HTTP allows automatic redirects only for GET requests.
But, if you can live with GET, then it is very easy.

-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Can ZPT form call a url?

2005-05-24 Thread Phillip Hutchings
 The easiest way it to perform a redirect.
 
 Unfortunately, HTTP allows automatic redirects only for GET requests.
 But, if you can live with GET, then it is very easy.

Fortunately, most web browsers are lax and let you do this. Safari is
not, but the warnings are a bit obscure to most users, as a 302
response technically means to repost the data to a new URL - hence
Safari's 'do you want to resend this data' question.

A 303 response should be used to redirect a POST request. The user is
still supposed to be asked if they want to follow the redirect, but I
bet most browsers won't, as the specs are ambiguous.

-- 
Phillip Hutchings
http://www.sitharus.com/
[EMAIL PROTECTED] / [EMAIL PROTECTED]
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Can ZPT form call a url?

2005-05-23 Thread Andreas Jung



--On Montag, 23. Mai 2005 22:36 Uhr -0400 James O'Keefe 
[EMAIL PROTECTED] wrote:



On our website we have a form where by a person can subscribe to our
announcements list.  It is the standard mailman form.

We would like to expand on that form such that a user can enter their
email address and zip code which we would log to our database and then
call the url to subscribe the person in the mailman list.



You definitely want to do this on the server side when submitting the form.
Since you can call scripts a from action you can call any known method
in Python to trigger an HTTP request (- Python's urllib module).

-aj


pgpdjWTbS4ZVV.pgp
Description: PGP signature
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )