mercredi 1 avril 2015

How do I submit the value of a jQuery variable in a form?

This should be a very easy question.


Basically I have a form without any fields, instead I want to pass along some data on what the user has done on the page when he clicks the Submit button. This data is very simple, a few integers and strings stored in various jQuery/Javascript variables.


However, I'm at a loss on how to actually pass these variables along with the form and save it in my database.


Should I first transform them into instance variables and then pass those along via hidden form fields? Should I make the entire form in jQuery? What should I do?


Aucun commentaire:

Enregistrer un commentaire