Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

164
Views
Do AJAX operations need the action and post attributes in <form> the way an HTML post submissions does?

I understand how the action and method attributes work when submitting a form, but is it needed in AJAX operations?

Basically looking for the difference between using AJAX to submit a form to a server versus using HTML post.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

AJAX doesn't need a form at all, it is a way of sending a request from the browser to the server which can contain any data you want. For instance, you can track where the user moves their mouse, and send this data to your server every few milliseconds.

If you are using it to send the contents of a form, then technically no, you don't need action and method attributes, because you can read the form fields directly, and send them wherever you like. However, it's usually a good idea to have them anyway, if only as a fallback for if the JavaScript goes wrong, or the user has JavaScript switched off.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!