Pass HTML form entries into a Javascript array to then be written to a client side cookie?

Posted by Tom on Stack Overflow See other posts from Stack Overflow or by Tom
Published on 2009-10-30T00:01:48Z Indexed on 2010/06/13 12:02 UTC
Read the original article Hit count: 234

Filed under:
|
|
|

I'm building a bit of a test-case JS application, something very basic, but have run into some problems.

I'm trying to use a HTML form for a user to enter a number, which is then written to a Javascript Array. The user then has the option to write that same array to a local (client side) cookie. (I understand the security implications of this - it's a test-case and not for commercial use.)

However, I can't make the connection - how can I capture the HTML entry, press 'submit' which will send it to a JS array, where the user can then press a different 'submit' which will write the array to a text file?

If anyone can help I'd appreciate it because it's been nearly 6 hours and it's not funny anymore.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html