I have a multi-array cookie that has default values assigned. On one page, I want the user to be able to override the default with the null string, so that if the user inputs even one value, all the other values left blank will override the default value ("not stated"
with the blanks.
It works fine in IE 5, but not in Netscape 4.7. In fact, NONE of the values get assigned to the cookie in Netscape, and all I get are the default "not stated" values, even for the ones that the user has input.
The communicator Javascript console states the error as "data has no properties." But isn't the null string a data property?
This is what I have now:
It works fine in IE 5, but not in Netscape 4.7. In fact, NONE of the values get assigned to the cookie in Netscape, and all I get are the default "not stated" values, even for the ones that the user has input.
The communicator Javascript console states the error as "data has no properties." But isn't the null string a data property?
This is what I have now:
Code:
onClick="{
if ((cookieTwo.data1.value == '') && (cookieTwo.data1.value == '') && (cookieTwo.data2.value == '') && (cookieTwo.data3.value == '') && (cookieTwo.data4.value == '')){
alert('You did not fill in anything!');
}
else {
data[1] = cookieTwo.data1.value;
data[2] = cookieTwo.data2.value;
data[3] = cookieTwo.data3.value;
data[4] = cookieTwo.data4.value;
}
setCookie('userData', data.join('!'));
}"