Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Feedback on: irt.org FAQ Knowledge Base

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


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 21st December 2007. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.