Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

default cookie override not working in Netscape

Status
Not open for further replies.

mcovey

Technical User
Apr 16, 2001
6
US
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:

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('!')); 
 }"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top