Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback on: irt.org FAQ Knowledge Base , July 21, 2000 at 05:35:59:

You are here: irt.org | About | Feedback | 1519 [ previous next ]

Feedback on:
irt.org FAQ Knowledge Base

Sent by
Malte on July 21, 2000 at 05:35:59:

Worth:
Worth reading

Comments:
Hi,

I am having a problem I can not seem to be able to find a solution for.
I am saving a complete array in a cookie and then reload it.
(Form var1,var2,var3,...). This works fine in Netscape but not IE.
There the cookie is fully saved into the first element of the array only.
This is what i do:
Set cookie on one page like:
var amounts = "amounts";
var amount = new Array();
amount[0] = document.form1.amount_001.value;
amount[1] = document.form2.amount_002.value;
amount[2] = document.form3.amount_003.value;
amount[3] = document.form4.amount_004.value;
amount[4] = document.form5.amount_005.value;
amount[5] = document.form6.amount_006.value;
WriteCookie(amounts, amount, 1000 * 60 * 60 * 24 * 1);

then recall it a) on same page (wont work)
with:
var amount = getCookie("amounts")
if (!amount) {amount = new Array(0,0,0,0,0,0,0,0,0,0,0,0)}
document.form1.amount_001.value = getCookie("amount01");
document.form2.amount_002.value = amount[2];
document.form3.amount_003.value = amount[4];
document.form4.amount_004.value = amount[6];
document.form5.amount_005.value = amount[8];
document.form6.amount_006.value = amount[10];

and b) on a different site with:
var amountstobuy = getCookie("amounts");
and then addressing the elements.

As said, it doesnt work in IE, I already altered the script so that IE saves it with ',' as well but still no help.
I would be really thankfull if you could help me with this.


Other feedback on 'irt.org FAQ Knowledge Base' - show all

©2018 Martin Webb