RESPONSE.redirect - dynamic names?
Is there some reason why the insertion of a variable into a redirect might not work? Thus: <dtml-let param="'sometext'"> -- sets param <dtml-var param> -- prints param as 'sometext' <dtml-call "RESPONSE.redirect('processform?withparam=<dtml-var param>')"> -- sends the string 'withparam=' across, missing the param value The characters making up 'sometext' are valid HTML characters. Thank you, Geoff
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 In article <NCBBIIEJLJNANBLOIPPJKENGDCAA.ggardiner@synomics.com>, Geoff Gardiner <ggardiner@synomics.com> writes
Is there some reason why the insertion of a variable into a redirect might not work? Thus:
<dtml-let param="'sometext'"> -- sets param <dtml-var param> -- prints param as 'sometext' <dtml-call "RESPONSE.redirect('processform?withparam=<dtml-var param>')">
I do this: <dtml-call "RESPONSE.redirect('processform?withparam=%s' % param)"> - -- Regards, Graham Chiu gchiu<at>compkarori.co.nz http://www.compkarori.com/dynamo - The Homebuilt Dynamo http://www.compkarori.com/dbase - The dBase bulletin -----BEGIN PGP SIGNATURE----- Version: PGPsdk version 1.7.1 iQA/AwUBOQfVKLTRdIWzaLpMEQJJ3gCfUE3yNYndP6LfFsog+g5GXORTtsEAoJXF 5cfI7+/POrbO5vCNyGhA0JTY =oWDI -----END PGP SIGNATURE-----
On Thu, 27 Apr 2000, Geoff Gardiner wrote:
Is there some reason why the insertion of a variable into a redirect might not work? Thus:
<dtml-let param="'sometext'"> -- sets param <dtml-var param> -- prints param as 'sometext' <dtml-call "RESPONSE.redirect('processform?withparam=<dtml-var param>')"> -- sends the string 'withparam=' across, missing the param value
The characters making up 'sometext' are valid HTML characters.
DTML tags cannot be used inside DTML tags. Something like this <untested> should work: <dtml-call "RESPONSE.redirect('processform?withparam='+param)"> Pavlos
<dtml-call "RESPONSE.redirect('processform?withparam=<dtml-var param>')">
Yes, because anything in quotes in a dtml-var is a python expression. What you want is: <dtml-call "RESPONSE.redirect('processform?withparam='+param)"> cheers, Chris
It's just so easy once you've been told (or, in other cases, you spot) the key to it! This works just fine. Thank you very much. Geoff -----Original Message----- ...
<dtml-call "RESPONSE.redirect('processform?withparam=<dtml-var param>')">
Yes, because anything in quotes in a dtml-var is a python expression. What you want is: <dtml-call "RESPONSE.redirect('processform?withparam='+param)">
Geoff Gardiner wrote:
Is there some reason why the insertion of a variable into a redirect might not work? Thus:
<dtml-let param="'sometext'"> -- sets param <dtml-var param> -- prints param as 'sometext' <dtml-call "RESPONSE.redirect('processform?withparam=<dtml-var param>')"> -- sends the string 'withparam=' across, missing the param value
The characters making up 'sometext' are valid HTML characters.
Use the following: <dtml-call "RESPONSE.redirect('processform?withparam=' + param)"> Inside those double quotes, you're in Python-speaking land, not DTML land. -- Steve Alexander Software Engineer Cat-Box limited
Hello, It seems like you can tweak a lot of parameters in z2.py to get the correct execution state. However if you want to tweak these when using pcgi_wrapper where do I look ?. I am most interested in the number of threads. Thanks sathya -- ########################## necessity is the mother of invention ##########################
participants (6)
-
Chris Withers -
Geoff Gardiner -
Graham Chiu -
Pavlos Christoforou -
sathya -
Steve Alexander