[Zope] Passing parameters to methods - how to?

Cesar A. K. Grossmann cesar@rotnet.com.br
Sat, 30 Sep 2000 17:30:55 -0300


Hi!

I'm making my own user managements methods, and I'm stucked with a
(simple) problem: How do I call another DHTML method, passing parameters
to it, in HTML?

I'm using a DTML Method that gives me a list of usernames. I want to
click on the username and get the properties for that username. I wrote
another DTML Method to do that, but I don't know how to pass the
username to this second DTML Method.

The username list page have, for every user, a line like that (suppose
two
usernames, fred and jorge):

<a href="ManageUserProperties">fred</a><br>
<a href="ManageUserProperties">jorge</a><br>

How do I pass the username to the ManageUserProperties DTML Method? I
have tried to use something like:

<a href="ManageUserProperties?username=fred">fred</a><br>
<a href="ManageUserProperties?username=jorge">jorge</a><br>

It works, but the ManageUserProperties DTML Method have another form in
it, that calls itself, using the POST method:

<form action="ManageUserProperties" method="POST">

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?

TIA
-- 
César A. K. Grossmann ckant@usa.net http://members.xoom.com/ckant/
http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html