By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,769 Members | 1,349 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,769 IT Pros & Developers. It's quick & easy.

redirection by cookie

P: n/a
I need to set a cookie on 5 pages, each being a different "home." Then
those pages will go to 10 common pages, but when they leave the common pages
to go back home I want them to the original home page they came from.

I know that I can do this with check boxes and a refresh. What I want to do
is set the cookie on the first page without it being seen, no need to
refresh since the other pages will be be reading the value set.

Any help would be greatly appreciated.

Jose
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
In article <ci4Yd.31075$Im.4408@okepread01>, jo*****@rbdi.net enlightened us
with...
I need to set a cookie on 5 pages, each being a different "home." Then
those pages will go to 10 common pages, but when they leave the common pages
to go back home I want them to the original home page they came from.

I know that I can do this with check boxes and a refresh. What I want to do
is set the cookie on the first page without it being seen, no need to
refresh since the other pages will be be reading the value set.

Any help would be greatly appreciated.


I'm not sure what it is that you don't know how to do.
You set a cookie the same way in javascript whether it is a called from a
function or just something floating along in the body.

You don't need checkboxes or a refresh to set a cookie with javascript. Just
set it in the body of the document somewhere and it's set. If you do
redirection (either server-side or via JS location.replace()) without sending
header data, though, you may have issues. But normal linking / navigation
should be fine.

--
--
~kaeli~
Murphy's Law #2030: If at first you don't succeed, destroy
all evidence that you tried.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2

P: n/a
Thanks I got it to work.
"kaeli" <ti******@NOSPAM.comcast.net> wrote in message
news:MP************************@nntp.lucent.com...
In article <ci4Yd.31075$Im.4408@okepread01>, jo*****@rbdi.net enlightened
us
with...
I need to set a cookie on 5 pages, each being a different "home." Then
those pages will go to 10 common pages, but when they leave the common
pages
to go back home I want them to the original home page they came from.

I know that I can do this with check boxes and a refresh. What I want to
do
is set the cookie on the first page without it being seen, no need to
refresh since the other pages will be be reading the value set.

Any help would be greatly appreciated.


I'm not sure what it is that you don't know how to do.
You set a cookie the same way in javascript whether it is a called from a
function or just something floating along in the body.

You don't need checkboxes or a refresh to set a cookie with javascript.
Just
set it in the body of the document somewhere and it's set. If you do
redirection (either server-side or via JS location.replace()) without
sending
header data, though, you may have issues. But normal linking / navigation
should be fine.

--
--
~kaeli~
Murphy's Law #2030: If at first you don't succeed, destroy
all evidence that you tried.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.