php - Nested form submitting parent form -
There is a problem implementing an address finder at this time. I have all this work on my own, I Where to postconia, postcode through JSON knocks back those addresses that I put in a selection and then I give it back to the chosen address ID.
The problem occurs when I integrate it into my shops checkout page. I look up the address through the post and find it in a form. When I press the submit button to look for the address, it submits the entire shopping form as if I want to buy something.
What am I thinking, if there is a better way of doing this, ie not with forms or form one form in one form and triggers nested form action only I think that Can I use Ajax but I am unable to achieve anything in the work and will still use the form element?
You can stop sublit by default
$ ('# form'). Submit (function (evt) {evt.preventDefault (); // Submit your postal code $ ('#Format'). Submit ();});
Comments
Post a Comment