I am not totally sure how many times I have mentioned I was working on this only to follow it up with a big I suck at javascript statement, but I am saving form comments locally now. So what does this mean? Well, if you have javascript enabled, when you click 'Submit' to post a comment on the page your comment is saved in a cookie on your computer. If, for whatever reason, there is a connection hiccup and your comment is not saved to the page, you can then click the 'Recall' button and it will read the post from the cookie and add it to the comment text box so you can resubmit. If all goes well, there should be no more lost posts.
Now my implementation is a little rough, and I will probably spend a little time over the next couple of days polishing it a little. As it is right now, I have a form.button called 'Recall' right next to the submit button. This will pop up reguardless of whether you have a post saved. I plan on writing a little snippit in there that prevents it from printing if there is not a comment saved. I also want to add a piece of code that removes the saved post if it is saved to the database. Even if I don't write this, the cookie will poof after 24 hours...or at least is supposed to. Also, I am only saving the comment, and not the title. I am not sure if I want to change this, but I might.
Now to give credit: most of the info I needed to do this came from http://www.quirksmode.org/ which is a great site for all things web related.
UPDATE: I have dumped the botton, and now have a link that pops up by the comment box. As I wanted to do, it now only pops up if a comment has been stored. I also am saving both title and comment now.




