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

  • SEARCH
  • Home
  • 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 975791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:38:43+00:00 2026-05-16T03:38:43+00:00

I am curious to know how modern web-apps/sites do postbacks, meaning when they are

  • 0

I am curious to know how “modern” web-apps/sites do postbacks, meaning when they are sending back user-input to the site be processed.

Do modern sites still use the old fashion <form>-tags or do they use some sort of javascript/ajax implementation? or is there even a third option?

  • 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-16T03:38:44+00:00Added an answer on May 16, 2026 at 3:38 am

    I tend to use both, where a full page refresh from a normal <form> submit works, but if JavaScript is enabled you hook up to the submit event and override it. This gives you fancy AJAX if possible, and graceful degradation if it’s not.

    Here’s a quick example (jQuery for brevity):

    <form type="POST" action="myPage.htm">
      <input type="text" name="UserName" />
      <button type="submit">Submit me!</button>
    </form>
    

    If the user has no JavaScript, no problem the form works. If they do (and most will) I can do this:

    $(function() {
      $("form").submit(function() {
        $.ajax({ 
          url: this.action,
          type: this.type,
          data: $(this).serialize(),
          success: function(data) {
            //do something with the result
          }
        });
      });
    });
    

    This allows the graceful degradation, which can be very important (depends on your attitude/customer base I suppose). I try and not screw over users without JavaScript, or if a JavaScript error happens on my part, and you can see from above this can be done easily/generically enough to not be painful either.

    If you’re curious about content, on the server you can check for the X-Requested-With header from most libraries and if it’s present, return just the <form> or some success message (since it was an AJAX request), if it’s not present then assume a full page load, and send the whole thing.

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

Sidebar

Related Questions

Curious to know how people set up their personal and/or work development environment, in
I'm curious to know how NULLs are stored into a database ? It surely
I'm curious to know whether the PDFKit framework is available for use within the
I am curious to know how the Loader maps DLL into Process Address Space.
I'm curious to know if there is an easy way to mock an IMAP
I am curious to know where the Don't Fragment [DF] Bit of the IP
I am a little curious to know about how OpenID authentication works. Is there
I came across this problem while preparing for an interview and curious to know
I realize this would violate convention, but I'm curious to know if you can
I am curious as to what others are using in this situation. I know

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.