0

I'm wondering if it is necessary to use a sumbit input in my AJAX based forms whereas:

1-)These forms must work with AJAX, if a user hasn't javascript he can't use my app

2 Answers 2

1

Its not needed, you can use the .submit() function to grab a form submit and make it return false so it doesn't redirect on submit.

Sign up to request clarification or add additional context in comments.

Comments

1

Its always best practice to use .submit as it will return the data you require and return false (as already mentioned). More importantly for usability it will allow the browser to show consistent behaviour, for example if a person uses tabs or hits 'enter' on the keyboard to submit.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.