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 3232412
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:09:28+00:00 2026-05-17T17:09:28+00:00

I am trying to make a Ajax form Submission in Jquery. The form itself

  • 0

I am trying to make a Ajax form Submission in Jquery. The form itself is loaded via an Ajax Event

The Form Element looks like this

<form id="create_user form" action="http://127.0.0.1/create_user" method="post">

  <p>Name
  <input type="text" name="name" value="" id="name"></p>
  <p>Employee Number:<br>
  <input type="text" name="emp_no" value="" id="emp_no"></p>
  <p>Email:<br>
  <input type="text" name="email" value="" id="email"></p>

  <p><input type="submit" name="submit" value="Save"></p>

  </form>

When loaded as html it works fine.

However I am trying to load it in another page via Ajax event

So the result looks like this

<div class="admin_main" id="admin_main">
<form id="create_user form" action="" method="post">

   .....Form......
<p><input type="submit" name="submit" value="Save"></p>
</form>

</div>

The Jquery code inside document ready function is

$("#admin_main").delegate("#create_user_form", "submit", function() {
    $.post('http://127.0.0.1/create_user', $("#create_user_form").serialize(), function (data) {
        $("#admin_main").html(data);
    }, "html");
});

However this has the effect of merely reloading the page. I have been at it for hours. Where am I going wrong?

  • 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-17T17:09:29+00:00Added an answer on May 17, 2026 at 5:09 pm

    I think you forgot the return: false; (or event.preventDefault() / event.stopPropagation() – not sure what is needed here) in the submit function. You definitely must stop the submit event somehow.

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

Sidebar

Related Questions

I am trying to make two ajax requests in parallel using jQuery like this:
Hi i was im trying to make a jquery ajax submit form, and im
I'm trying to make an Ajax search form - This form will simply search
I'm trying to use Ajax, PHP, and MySQL together to make a form element,
I'm trying to make an AJAX form that will update a twitter status when
I'm trying to to make AJAX call with the jQuery library using the $.ajax()
i am trying to make a ajax call by making use of jquery UI
I'm currently trying to make some ajax post between cross-domains by following this tutorial
I am trying to get an autocomplete working and making an Ajax form submission
I am trying to create a car make/model form using Javascript or AJAX, problem

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.