can anyone tell me why line 15 is getting a syntax error.
Bear with me I know less about cookies than I did about forms. notice I said ‘did’ because I have learned so much on here lately.
[code=php]//first I need to find the cookie
function ReadCookie(wishlist) {
var theCookie=””+document.cookie;
var ind=theCookie.indexOf(wishlist);
if (ind==-1 || wishlist==””) return “”;
var ind1=theCookie.indexOf(‘;’,ind);
if (ind1==-1) ind1=theCookie.length;
}
// now I need to split it further.
var wish = theCookie.substring(ind,ind1);
wish = unescape(wish);
wishlist=wish.split(‘&’);
for(var i=);i<wishlist.length;i++){
var product+wishlist[i].split(‘:’);
var productname=product[0];
var remainder=product[1].split(‘=’);
var describe=remainder[0];
var pagelocation=remainder[1];
displayWishlist(productname,describe,pagelocation);
}
//now its split I need to create nodes and assign attributes
function displayWishlist(productname,describe,pagelocation){
var descrip=document.createTextNode(describe);
var linkString=pagelocation + ‘.html’;
var anchorSign=document.CreateElement(‘a’);
var moreDetails=document.createTextNode(‘more details’);
var words=document.createTextNode(‘click here for more’);
var lineSpace=document.createElement(‘br /);
var p+document.createElement(‘p’);
var name=document.createElement(‘span’);
var image=document.createElement(‘img’);
var srcString=”images/”+ productname = ‘.jpg’;
//now tell it where to put it all
var place=document.getElementById(‘middle’);
anchorSign.href=hrefString;
image.setAttribute(‘src’,srcString);
image.setAttribute(‘alt’,productName);
p.className=’newPara’;
anchorSign.appendChild(moreDetails);
name.appendChild(descrip);
p.appendChild(image);
p.appendChild(name)
p.appendChild(lineSpace)
p.appendChild(words)
p.appendChild(anchorSign);
place.appendChild(p);
return;
}