1

I have a form which should save and load information to and from a cookie:

http://jsfiddle.net/kFVGH/

here is the code and I can understand that it will not work in jsFiddle for a few reasons (maybe it can, maybe it can't) but I cannot get it to work on my website at all.

I have had one working before but when I come to alter the code to make way for new form elements it stops working.

Any ideas?

Michal
  • 3,262
  • 4
  • 30
  • 50
John Vasiliou
  • 977
  • 7
  • 27
  • 48
  • 1
    I suggest you to use jquery , if that is not an issue . It has cookie plugin. I am scared to go through you code. It too much spaghetti :) – sakhunzai Apr 10 '12 at 13:36
  • hahaha! Thank you @sakhunzai for your recommendation. I will have a look at jQuery, but I guess that will consist of more time to research, learn and implement. – John Vasiliou Apr 10 '12 at 13:38
  • 1
    will not be a big issue for you, check this http://stackoverflow.com/questions/1599287/create-read-and-erase-cookies-with-jquery – sakhunzai Apr 10 '12 at 13:43
  • thank you! Having a look now. – John Vasiliou Apr 10 '12 at 13:47
  • your are welcome , but I observed a subtle issue. Why you are storing values in cookie . There is better storage mechnims available for storing values across the pages ,check this also ( my answer ) http://stackoverflow.com/questions/10054097/how-collect-onclick-return-value-from-javascript-function. Read the reference link and choose the one which suites you – sakhunzai Apr 10 '12 at 13:54

0 Answers0