Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5999663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:35:02+00:00 2026-05-23T00:35:02+00:00

Philosophical question: Say I’ve got a web app that requires javascript and a modern

  • 0

Philosophical question:

Say I’ve got a web app that requires javascript and a modern browser, so progressive enhancement is not an issue. If my form is being built via javascript, and my data updates are all being done via ajax POSTs & PUTs, is there really any reason to wrap my controls in a form tag? If I’m still going to use the tag, say for semantic or structural reasons, is there any reason to have action and method params that I’m going to ignore? It kind of feels like a hold-over from an earlier era to me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T00:35:03+00:00Added an answer on May 23, 2026 at 12:35 am

    There is at least one important user-experience feature provided specifically by wrapping inputs inside a form tag:

    The enter key will submit the form. In fact, in Mobile Safari, this is how you get the “Go” button to appear on the keyboard.

    Without a form wrapping the inputs, there is nothing to submit.

    You can of course provide enter-key behavior through a keypress event, but I don’t know about if this works for mobile devices. I don’t know about you, but I’d rather work with the semantics provided by the browser than have to imitate them with events.

    In your case, you would simply provide an onsubmit event handler for the form, which would do your AJAX submit, then return false, canceling the actual submit.

    You can simply provide action="" (which means “self”), and method is not required — it defaults to GET.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a philosophical programming problem. Let's say I have a class named Employees.
Bit of a philosophical question. If you have a public website with a site
This may be a philosophical question. Suppose you're making an AJAX request to a
I guess this is sort of a philosophical question, but I have some code
This is more of a philosophical question than anything, so give me your thoughts.
I'm not sure I understand scope - does an out-of-scope variable (I'm using Ruby)
I must confess I'm somewhat of an OOP skeptic. Bad pedagogical and laboral experiences
Being primarily a C++ developer the absence of RAII (Resource Acquisition Is Initialization) in
Note: This was posted when I was starting out C#. With 2014 knowledge, I
All I want is a pragmatic random number generator in C# so I can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.