Hi guys, thanks for the help! I have a lighbox that posts via ajax some params. If there is an error, the window has a "back" button and on press it shows the latest saved lighbox content. If it is a form, then should be already compiled or can be really annoiyng recompile it... I could then serialize the inputs and then cycle the form inputs and fill them with the serialized object... what do you think about it?
On 19 Ago, 03:48, James <[email protected]> wrote: > You can use serializeArray() to serialize all the form info into an > object.http://docs.jquery.com/Ajax/serializeArray > > For what purpose are you "saving" the state of the form? Maybe there > are workarounds depending on what you're trying to achieve. > > On Aug 18, 7:29 am, resetstudio <[email protected]> wrote: > > > Hi everybody, how are you? > > I have to save the state of a form in a var before submitting it with > > the whole html, but if I alert the var, I get the original html > > without the updated input fields. > > > Example: > > I have > > <div> > > <input type='text' name='test'/> > > </div> > > > and I fill that field with "hahahah", on $("div").html() i get "<input > > type='text' name='test'/>" and not "<input type='text' name='test' > > value='hahahah'/>". > > > Can someone help me? > > > Tank you!

