Dalkalion
asked on
Trying to get cookie array and I get an object expected error
I'm trying to get cookie array and I get an object expected error on line 9
var l = 0;
If my cookies are "undefined" will this cause this error?
Here is my code:
function getCookieArray(Thumbc)
var i = 0;
while (getCookie(Thumbc + i) != null) {
this[i + 1] = getCookie(Thumbc + i);
i++; this.length = i;
}
}
function getCookieArray(Titlec){
var l = 0;
while (getCookie(Titlec + l) != null) {
this[l + 1] = getCookie(Titlec + l);
l++; this.length = l;
}
}
var ThumbArray = new getCookieArray("Thumbc");
var TitleArray = new getCookieArray("Titlec");
var l = 0;
If my cookies are "undefined" will this cause this error?
Here is my code:
function getCookieArray(Thumbc)
var i = 0;
while (getCookie(Thumbc + i) != null) {
this[i + 1] = getCookie(Thumbc + i);
i++; this.length = i;
}
}
function getCookieArray(Titlec){
var l = 0;
while (getCookie(Titlec + l) != null) {
this[l + 1] = getCookie(Titlec + l);
l++; this.length = l;
}
}
var ThumbArray = new getCookieArray("Thumbc");
var TitleArray = new getCookieArray("Titlec");
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
function getCookieArray(Thumbc){