[Zope] How do you replace content with an action?

Passin, Tom tpassin at mitretek.org
Thu Sep 2 13:25:14 EDT 2004


> From: zope-bounces at zope.org [mailto:zope-bounces at zope.org] On Behalf
Of
> 
> I need to be able to replace the content of a defined variable with an
> action. That action is by clicking a link that will redefine the
> variable with different content.
> 

It sounds like you are confused between client and server actions.  You
are asking for something to happen after someone clicks a link on the
page displayed in a browser - the client.  At this point, Zope has
replaced the page template with the actual markup for the web page, and
has sent the page to the browser.  There are no page variables or
templates anymore. They are gone and forgotten.

To get an action to happen on the browser, you have two possibilities -

1) Make it happen within the browser using javascript, or

2) Send a form from the browser to the server, and have the server
(Zope)create a new page that contains the changes you want (as well as
all the unchanged parts).

1) does not involve page templates at all, since it does not involve
Zope in any way.

You need to think more carefully about what you want to happen, and
where it should happen.  Then we can give you more useful help.

Cheers,

Tom P


More information about the Zope mailing list