Find jobs - Debt Consolidation - Wordpress Themes - Debt Consolidation - Wordpress Themes

PDA

View Full Version : Urgent help needed - wishlist cookie


Lexxi
Apr 24th 2007, 2:53 am
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:

http://www.pamperdayz.co.uk/wishlist.gif

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.

dzysyak
Apr 25th 2007, 1:06 pm
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.

Lexxi
Apr 25th 2007, 1:38 pm
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!