Re: [Zope] Passing parameters to methods - how to?

2000-10-03 Thread seb

"César A. K. Grossmann" wrote:
 
 Maik Roeder wrote:
 
   Clicking in the "submit" button, it gives me an error, telling that
   'username' is not defined. So I included an hidden field with
   name="username" and value="dtml-var username", but I'm thinking this
   is not the better way to do that...

 That is the real question: how to substitute the
 'a href="ManageUserProperties?username=someuser"someuser/a' using
 hidden fields? M

 I'm thinking that maintaining some "session attributes" in a cookie is
 another idea, and sustitute the direct call to the method to a call to a
 JavaScript, but I don't want to use the most complicated method...

There are only two ways of doing this:
1) hidden form inputs
2) cookies
3) session variables (kind of like number 2)

Using the former solution, you can make your link be the submit button
for the form, either by using Javascript (yuk: a
href="javascript:document.forms['myform'].submit()"someuser/a) or by
making it a graphical button rather than a text link (input
type=button, img="button.gif" as far as I remember, but I might be
wrong).

Why use javascript to access cookies?  You can set and get them purely
using zope.  http://www.zope.org/Members/BwanaZulia/cookies.  Also, why
not install a session product (HappySession, FSSession, SQLSession...),
it'll probably make your life easier in the long run...

seb

___
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] Passing parameters to methods - how to?

2000-10-02 Thread César A. K. Grossmann

Maik Roeder wrote:
 
  Clicking in the "submit" button, it gives me an error, telling that
  'username' is not defined. So I included an hidden field with
  name="username" and value="dtml-var username", but I'm thinking this
  is not the better way to do that...
 
 To my knowledge, it's the only way to do it, and if it works, why bother ?

And from the first link, there are a way to include such a hidden field
when calling a link? That is the real question: how to substitute the
'a href="ManageUserProperties?username=someuser"someuser/a' using
hidden fields? ManageUserProperties is an DTML method, and are
differents calls, with differents usernames in the same page (if I put a
hidden field it's value will be the same to all the calls to the DTML
Method in question).

I'm thinking that maintaining some "session attributes" in a cookie is
another idea, and sustitute the direct call to the method to a call to a
JavaScript, but I don't want to use the most complicated method...

[]s
-- 
 +-+-+
 | César A. K. Grossmann   | Capacitação Solidária   |
 | [EMAIL PROTECTED]| http://www.uol.com.br/umminuto/ |
 | http://members.xoom.com/ckant/  | Clique e doe - é de graça   |
 +-+-+
   http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html
If you know the answer to a question, don't ask.
-- Petersen Nesbit

___
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] Passing parameters to methods - how to?

2000-09-30 Thread Maik Roeder

Hi Cesar !

 Clicking in the "submit" button, it gives me an error, telling that
 'username' is not defined. So I included an hidden field with
 name="username" and value="dtml-var username", but I'm thinking this
 is not the better way to do that...
 
 Can someone helps me?

To my knowledge, it's the only way to do it, and if it works, why bother ?
 
Regards,

Maik

-- 
Uzopia - Digging la vida Zopa - http://uzopia.editthispage.com

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