Javascript wishlist

This is a discussion on "Javascript wishlist" within the JavaScript Forum section. This forum, and the thread "Javascript wishlist are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Apr 21st, 2007, 18:54
New Member
Join Date: Apr 2007
Location: UK
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Javascript wishlist

I hope someone can help me with this. I am trying to display a wishlist on my site.

The cookie is:

var cookieString = 'prodimage01:Product Name and basic info=poductlink01&' + 'prodimage02:Product Name and basic info=poductlink02&' + 'prodimage03:Product Name and basic info=poductlink03&' + 'prodimage04:Product Name and basic info=poductlink04&'

function SetCookie(name, value) {
document.cookie = name + "=" + escape(value);
}

SetCookie('wishlist', cookieString);


Where prodimage01 etc relates to prodimage01.jpg (photograph of that product) and productlink01 is productlink01.htm (link back to that products page).

I want to be able to display the image, the name and info as shown in the cookie, and the link back to the product page.

"&" separates the indiviual products, and ":" and "=" separate the data for each product.

How do I display this?

Thanks
Reply With Quote

  #2 (permalink)  
Old Apr 24th, 2007, 09:55
New Member
Join Date: Apr 2007
Location: UK
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Javascript wishlist

PLEASE HELP

The following cookie is formed by clicking my add to wishlist buttons:

cookieString =
'photo1:This is photograph one=link1&' +
'photo2:This is photograph two=link2&' +
'photo3:This is photograph three=link3&' +
'photo4:This is photograph four=link4'

I need to know how to produce this:



where photo1 is a jpg file, and link1 is an htm file.

I have only been working with javascript for 2 months so I am a real noob and need serious help.
Reply With Quote
Reply

Tags
loop, split

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
php and javascript yvettesio JavaScript Forum 8 Mar 14th, 2007 23:18
JavaScript cbrams9 JavaScript Forum 1 Sep 20th, 2006 17:35
using xml in javascript shailu JavaScript Forum 0 Jul 25th, 2006 07:36
Can someone help me with this javascript Galaxyblue JavaScript Forum 2 Mar 11th, 2004 12:18
what does \\ mean in javascript jenjen1018 JavaScript Forum 5 Jan 6th, 2004 17:05


All times are GMT. The time now is 00:03.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43