Urgent help needed - wishlist cookie

Discussion in 'JavaScript' started by Lexxi, Apr 24, 2007.

  1. #1
    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:

    [​IMG]

    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.
     
    Lexxi, Apr 24, 2007 IP
  2. dzysyak

    dzysyak Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Sorry, but I am not sure that using cookies is the best solution. And I am not sure that clearly understand what should be done. Can you provide more details. Use split function to separate values of the cookie and something like document.getElementById('your_img_id').src=''; to define the image url.
     
    dzysyak, Apr 25, 2007 IP
  3. Lexxi

    Lexxi Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    it's a demo, there is just one cookie which was provided for me (shown) and the demo is how to make the cookie split and be displayed like the picture.

    I've actually managed most of it, save for my first image always failing to load.

    Here's the link: http://www.pamperdayz.co.uk/wishlist.htm

    Any suggestions would be great!
     
    Lexxi, Apr 25, 2007 IP