[Zope] <dtml-var expr="RESPONSE.redirect Question

Alexander Alvarado funalito at hotmail.com
Thu Sep 11 20:43:06 EDT 2003


Yes, that is what I want!!

So I used the Python expresion:

<dtml-var expr="RESPONSE.redirect('Disponibilidad?Arrival=%s&Departure=%s' %
(REQUEST['dcArrival'], REQUEST['dcDeparture']))">

But it sends mi to the Zope Quick Start page, What am i doing wrong now??

Thanks !!


>From: Paul Winkler <pw_lists at slinkp.com>
>To: Zope Users <zope at zope.org>
>Subject: Re: [Zope] <dtml-var expr="RESPONSE.redirect         Question
>Date: Thu, 11 Sep 2003 15:00:40 -0400
>
>On Thu, Sep 11, 2003 at 11:40:39AM -0700, Dylan Reinhardt wrote:
> > On Thu, 2003-09-11 at 11:34, Alexander Alvarado wrote:
> > > Hi, this is adum question, but how can I include variables in the 
>redirect
> > > expresion, I want to redirect to a page and at the same page send the
> > > variables what I want is something like this:
> > >
> > > <dtml-var
> > > 
>expr="RESPONSE.redirect('Disponibilidad?Arrival=The_value&Departure=The_value')">
> > >
> > > Where The_value is a date sent from an other page...
> >
> > Assuming that Disponibilidad resolves to a full URL (with http://) and
> > The_value can be acquired, what you have should work.
> >
> > What errors/problems are you seeing?
>
>I think he means that he wants to pass a variable rather than
>the literal string "The_value."
>Alexander, you just need a string argument to RESPONSE.redirect.
>Everythin in double-quotes above is a python expression, and it's easy to
>built a string out of variables in python.  You can use the + operator
>to concatenate strings, or use the % operator to do printf-style 
>formatting.
>An example of the latter, assuming the variables are available in REQUEST:
>
>  <dtml-var
>   expr="RESPONSE.redirect('Disponibilidad?Arrival=%s&Departure=%s' % 
>(REQUEST['start_date'], REQUEST['end_date']))">
>
>--
>
>Paul Winkler
>http://www.slinkp.com
>Look! Up in the sky! It's PUMA GOAT!
>(random hero from isometric.spaceninja.com)
>
>_______________________________________________
>Zope maillist  -  Zope at 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 )

_________________________________________________________________
¿Estás buscando un auto nuevo?  http://www.yupimsn.com/autos/




More information about the Zope mailing list