Hi I want to redirect a user from my page to another page after a certain time, I put this code in the dtml page at the top I want to redirect from: <dtml-call "REQUEST.RESPONSE.setHeader('Refresh', '5', 'URL Address')"> But although it does refresh after the timeout it stays in the same page instead of going to the address listed in URLAddress. Anyone knows what I did wrong? Or I even did it the right way?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 11.03.2009 13:59 Uhr, Dvir Bar-lev wrote:
Hi
I want to redirect a user from my page to another page after a certain time, I put this code in the dtml page at the top I want to redirect from:
<dtml-call "REQUEST.RESPONSE.setHeader('Refresh', '5', ‘URL Address’)">
Likely improper syntax. The correct syntax for the Refresh header is Refresh: 5; url=http://foo.com - -aj -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkm3unIACgkQCJIWIbr9KYxzVgCg0qp4wPDCQygnDCv4aUQlqNKG QxcAoKgZndhxhKPfyYhTOb82nRWPZR08 =L8/u -----END PGP SIGNATURE-----
Le mercredi 11 mars 2009 à 14:59 +0200, Dvir Bar-lev a écrit :
I want to redirect a user from my page to another page after a certain time, I put this code in the dtml page at the top I want to redirect from:
<dtml-call "REQUEST.RESPONSE.setHeader('Refresh', '5', ‘URL Address’)">
Maybe I'm wrong but I think it should be something like : setHeader('Refresh', '5;URL=http://...') Thierry Florac -- Chef de projet intranet/internet Office National des Forêts - Département Informatique 2, Avenue de Saint-Mandé 75570 PARIS Cedex 12 Mél : thierry.florac@onf.fr Tél. : +33 01.40.19.59.64 Fax. : +33 01.40.19.59.85
Yep, you were right, the syntax I used was bad, but now I encountered a diffrent problem. If i set the header as you said and manually refresh the page than it wont redirect again. Anyone encountered this before? Can't find anything on the web about this problem -----Original Message----- From: Thierry Florac [mailto:thierry.florac@onf.fr] Sent: Wednesday, March 11, 2009 3:24 PM To: Dvir Bar-lev Cc: zope@zope.org Subject: Re: [Zope] redirect timeout doesn't work Le mercredi 11 mars 2009 à 14:59 +0200, Dvir Bar-lev a écrit :
I want to redirect a user from my page to another page after a certain time, I put this code in the dtml page at the top I want to redirect from:
<dtml-call "REQUEST.RESPONSE.setHeader('Refresh', '5', ‘URL Address’)">
Maybe I'm wrong but I think it should be something like : setHeader('Refresh', '5;URL=http://...') Thierry Florac -- Chef de projet intranet/internet Office National des Forêts - Département Informatique 2, Avenue de Saint-Mandé 75570 PARIS Cedex 12 Mél : thierry.florac@onf.fr Tél. : +33 01.40.19.59.64 Fax. : +33 01.40.19.59.85
Hi just wanted to add something that I forgot to meantion. The problem I described only happenes on IE, on firefox it does the redirect even after I refresh the page manually -----Original Message----- From: zope-bounces@zope.org [mailto:zope-bounces@zope.org] On Behalf Of Dvir Bar-lev Sent: Wednesday, March 11, 2009 3:47 PM To: zope@zope.org Subject: Re: [Zope] redirect timeout doesn't work Yep, you were right, the syntax I used was bad, but now I encountered a diffrent problem. If i set the header as you said and manually refresh the page than it wont redirect again. Anyone encountered this before? Can't find anything on the web about this problem -----Original Message----- From: Thierry Florac [mailto:thierry.florac@onf.fr] Sent: Wednesday, March 11, 2009 3:24 PM To: Dvir Bar-lev Cc: zope@zope.org Subject: Re: [Zope] redirect timeout doesn't work Le mercredi 11 mars 2009 à 14:59 +0200, Dvir Bar-lev a écrit :
I want to redirect a user from my page to another page after a certain time, I put this code in the dtml page at the top I want to redirect from:
<dtml-call "REQUEST.RESPONSE.setHeader('Refresh', '5', ‘URL Address’)">
Maybe I'm wrong but I think it should be something like : setHeader('Refresh', '5;URL=http://...') Thierry Florac -- Chef de projet intranet/internet Office National des Forêts - Département Informatique 2, Avenue de Saint-Mandé 75570 PARIS Cedex 12 Mél : thierry.florac@onf.fr Tél. : +33 01.40.19.59.64 Fax. : +33 01.40.19.59.85 _______________________________________________ Zope maillist - Zope@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 )
On Wed, Mar 11, 2009 at 15:18, Dvir Bar-lev <dvir.b@puresight.com> wrote:
Hi just wanted to add something that I forgot to meantion. The problem I described only happenes on IE, on firefox it does the redirect even after I refresh the page manually
So yet another IE bug then. You want a lot of timeouts and redirections and stuff in your application. Are you sure old-school HTML is the right way to do this? Sounds like an AJAX app could be more suitable. -- Lennart Regebro: Pythonista, Barista, Notsotrista. http://regebro.wordpress.com/ +33 661 58 14 64
It's ok I solved this by using a javascript at the end to achieve this -----Original Message----- From: Lennart Regebro [mailto:regebro@gmail.com] Sent: Thursday, March 12, 2009 10:22 AM To: Dvir Bar-lev Cc: zope@zope.org Subject: Re: [Zope] redirect timeout doesn't work On Wed, Mar 11, 2009 at 15:18, Dvir Bar-lev <dvir.b@puresight.com> wrote:
Hi just wanted to add something that I forgot to meantion. The problem I described only happenes on IE, on firefox it does the redirect even after I refresh the page manually
So yet another IE bug then. You want a lot of timeouts and redirections and stuff in your application. Are you sure old-school HTML is the right way to do this? Sounds like an AJAX app could be more suitable. -- Lennart Regebro: Pythonista, Barista, Notsotrista. http://regebro.wordpress.com/ +33 661 58 14 64
participants (4)
-
Andreas Jung -
Dvir Bar-lev -
Lennart Regebro -
Thierry Florac