lundi 20 avril 2015

Any advantage of jquery .submit() vs jquery .click() if calling .post() in the event?

I have a modal window with address fields in it. I'm trying to understand if I even need a form tag wrapped around my address fields?

When I press the submit/save button, I'm calling .post() to send the address to the controller and if the address is found with Google Maps I update/save the address and send back some data to fill in the map. I also close the modal. If the address isn't found I just show an error message.

Do I really need a ajax.submit here with a form tag wrapped around the fields? What advantage does it provide me for the situtaion I have?

Aucun commentaire:

Enregistrer un commentaire