Re: [setcookie] & [redirect]
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 21828
interpreted = N
texte = >>Is it possible to have a setcookie and a redirect on the same page? I have>>been trying to do this, but I seem to always get redirected before the>>cookie is set? Any ideas?>>>Putting [REDIRECT http://www.smithmicro.com/] in your template will>force the remote browser to immediately 'jump' to the new location>specified, rather than displaying whatever is in the template. Any other>text in the template will be ignored.This information, although taken directly from the HTML docs, is misleading. It makes it sound like none of the webdna code in the template gets executed except for the [redirect], but that's simply not true. Nothing in the template gets displayed, of course, because the [redirect] sends the browser somewhere else -- but the webdna code appearing before the [redirect] tag *should* be executed as expected.There's probably some special interaction between [setcookie] and [redirect] that prevents the cookie from being set. The meta tag approach should work instead, or you could use [returnRaw] to set the cookie ...Sincerely,Ken Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://www.webdna.net
Associated Messages, from the most recent to the oldest:
>>Is it possible to have a setcookie and a redirect on the same page? I have>>been trying to do this, but I seem to always get redirected before the>>cookie is set? Any ideas?>>>Putting [REDIRECT http://www.smithmicro.com/] in your template will>force the remote browser to immediately 'jump' to the new location>specified, rather than displaying whatever is in the template. Any other>text in the template will be ignored.This information, although taken directly from the HTML docs, is misleading. It makes it sound like none of the webdna code in the template gets executed except for the
[redirect], but that's simply not true. Nothing in the template gets displayed, of course, because the
[redirect] sends the browser somewhere else -- but the webdna code appearing before the
[redirect] tag *should* be executed as expected.There's probably some special interaction between [setcookie] and
[redirect] that prevents the cookie from being set. The meta tag approach should work instead, or you could use
[returnraw] to set the cookie ...Sincerely,Ken Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://www.webdna.net
Kenneth Grome
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
[OT] Help Webcat 213 win (2000)
[WebDNA] Data loss (2016)
[OT] Double chars in form (ie 5.2 mac OSX) (2004)
MasterCounter and capitalization (1997)
return two fields w/ [lookup] (1998)
Lookup Notfound (1998)
WebCat editing, SiteGuard & SiteEdit (1997)
[WebDNA] Combining searches (2016)
My slower response (1997)
2.0 Info (1997)
Mixing and/or in searches (1998)
help with http upload again (2000)
Thanks and Big News!!! (1997)
[protect] on NT? (1997)
Re:[ShowIf] and empty fields (1997)
NY taxRates.db? (1997)
Date problems-more (1997)
Upgrading old WebCat Database Files (1997)
db could not be found or opened (2002)
How to verify email address (1997)