Hello I am working on multi step registration form and it contains file uploads in the intermediate step . I am storing each value in the form in the cookie to work it with browser back button and and reset the same in the final form which i want to post at the. But how to store the file upload in the cookie so that i can set it when user clicks on a browser back button. Also i need to submit it along with the final form.
+1
A:
You can't store a file in a cookie, you are going to have to store it on the server and keep a reference to the server within the cookie if you want it to work as you describe.
Something you could do is keep the entire form on one pageload and swap the content of a div dynamically. That way you could just hide the form elements you don't need, including the file form. A submit button at the end would take all the hidden inputs, with the file and post them all to the server.
Sam152
2010-07-26 12:14:10
Sam thank you for replyIts not only image it can be file of any type i just want to store it into the javascript cookie and if possible set this as hidden element which can go through the form post as file upload.I just want to know whether its possible if yes can you please tell how ...
Robin sharma
2010-07-26 12:29:16
Updated my reply somewhat.
Sam152
2010-07-26 12:43:15