maynard444
Programmer
Howdy neighbors,
I need some assistance with some missing cookies. At first I thought the computer was just eating them, but then I woke up. Ok first I will lay out what i am working with. I start out with an index document. It has several different links on it that call functions to set a cookie to load unique information to a generic form(stuff like the header text, links to forms and publications, and so on). The second page that is called when the link on the first page is clicked contains all the correct information that the cookie passed. On this form there are also links, when these are pressed they do basically the same thing the links on the first page do. They set a cookie to insert data into the next form. When a link is clicked it loads all the information in the third document correctly. The problem I have is that when I hit the back button to go to the second page to select another option, the data pulled from the cookie read on the first page is gone. I need to know if anyone has a remedy for this. I've had about 7 different projects thrown on me in the last 2 weeks and I am in a crunch to get these done because early September I will most likely be beginning an Implementation of JD Edwards HRIS. Any info anyone could give would help. Thanks,
Heath
Oh yeah, here is a little snippet of some of the code i use to read and write the cookies:
This is in the head of the first page-
function regioncode() {
var now = new Date();
now.setMinutes(now.getMinutes() + 10);
var regiondata =escape("Louisville"
;
document.cookie=regiondata;
window.location="louisville_home_page.htm";
}
FYI Timing out because of the expiration time is not the problem.
In the body i call the function with an onClick.
This is in the head of the second page-
function autofill1() {
var now = new Date();
now.setSeconds(now.getSeconds() + 3);
var state= escape('KY');
var email = escape("somebody.somehow@cracky.com"
;
document.cookie = state + "xxx" + email + "xxx" + ";expires=" +now;
window.location = "address_change.htm";
}
var readcookie=unescape(document.cookie);
var title=readcookie.toString();this part is used to write part of a title in the body.
As you can see, I am also reading a cookie in ths page also to gather specific in formation for the third page. If anybody knows how to recall a cookie, or how to call a function to read a new cookie on the back() event I would be in your debt.
I need some assistance with some missing cookies. At first I thought the computer was just eating them, but then I woke up. Ok first I will lay out what i am working with. I start out with an index document. It has several different links on it that call functions to set a cookie to load unique information to a generic form(stuff like the header text, links to forms and publications, and so on). The second page that is called when the link on the first page is clicked contains all the correct information that the cookie passed. On this form there are also links, when these are pressed they do basically the same thing the links on the first page do. They set a cookie to insert data into the next form. When a link is clicked it loads all the information in the third document correctly. The problem I have is that when I hit the back button to go to the second page to select another option, the data pulled from the cookie read on the first page is gone. I need to know if anyone has a remedy for this. I've had about 7 different projects thrown on me in the last 2 weeks and I am in a crunch to get these done because early September I will most likely be beginning an Implementation of JD Edwards HRIS. Any info anyone could give would help. Thanks,
Heath
Oh yeah, here is a little snippet of some of the code i use to read and write the cookies:
This is in the head of the first page-
function regioncode() {
var now = new Date();
now.setMinutes(now.getMinutes() + 10);
var regiondata =escape("Louisville"
document.cookie=regiondata;
window.location="louisville_home_page.htm";
}
FYI Timing out because of the expiration time is not the problem.
In the body i call the function with an onClick.
This is in the head of the second page-
function autofill1() {
var now = new Date();
now.setSeconds(now.getSeconds() + 3);
var state= escape('KY');
var email = escape("somebody.somehow@cracky.com"
document.cookie = state + "xxx" + email + "xxx" + ";expires=" +now;
window.location = "address_change.htm";
}
var readcookie=unescape(document.cookie);
var title=readcookie.toString();this part is used to write part of a title in the body.
As you can see, I am also reading a cookie in ths page also to gather specific in formation for the third page. If anybody knows how to recall a cookie, or how to call a function to read a new cookie on the back() event I would be in your debt.