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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:23:56+00:00 2026-06-01T20:23:56+00:00

I have a page with three simple html forms which submit to various tables

  • 0

I have a page with three simple html forms which submit to various tables in a database (using AJAX and JQuery). When a form is submitted, it currently disappears and a message posts:

<div class="success_m" style="display:none;">
   <p>Manufacturer has been added!</p>
   <h4><a href="path/to/the/forms/page">Add another Manufacturer!</a></h4>
</div>

To post another manufacturer to the database, I click the “Add another Manufacturer!” link and it refreshes the whole page. I’ve tried to set it up so that when the form is submitted, it disappears, a success message shows for a second, and then the cleared form comes back…It works except now the form doesn’t disappear at all, and the message just flashes below it.

My attempt is below, thanks for any advice!!

Mike

$(document).ready(function(){
    $("form#submit_m").submit(function() {
    // we want to store the values from the form input box, then send via ajax below
    var manu_name       = $('#manu_name').attr('value');
    var manu_web        = $('#manu_web').attr('value');
    var manu_email      = $('#manu_email').attr('value');
    var manu_phone      = $('#manu_phone').attr('value'); 
    var manu_phone_ext  = $('#manu_phone_ext').attr('value');
    var manu_info       = $('#manu_info').attr('value'); 

        $.ajax({
            type: "POST",
            url: "process_m.php",
            data:"manu_name="+ manu_name+"&manu_web="+manu_web+"&manu_email="+manu_email+"&manu_phone="+ manu_phone
            +"&manu_phone_ext="+manu_phone_ext+"&manu_info="+manu_info,
            success: function(){
                // reset form, success message, refresh form 
                resetForm($('#submit_m'));
                $('form#submit_m').hide();
                $('div.success_m').fadeIn(250).delay(1000).fadeOut(250);
                $('form#submit_m').show();
            }
        });
    return false;
    });
});

That resetform function in the success queue is from THIS SO post.

Any help is appreciated!

  • 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-06-01T20:23:57+00:00Added an answer on June 1, 2026 at 8:23 pm

    You’re missing open and closing parenthesis on the call of the show() function

    ...
    $('div.success_m').fadeIn(250).delay(1000).fadeOut(250);
    $('form#submit_m').show(); // add parenthesis here
    ...
    

    To make the form hide and re-appear you need to fade it back like your success div or use something like a setTimeout(). The way you’re handling it now it just hides and then shows with no break in between. So it appears instantaneous…

    Example:

    setTimeout(function() { $('form#submit_m').show(); }, 1000);
    

    Here is a jsFiddle example

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

Sidebar

Related Questions

I have created a Django app. I have a registration page(simple HTML form) in
Suppose I have an HTML page with three blocks of fixed width (their height
I have created a simple html page to test the localstorage and for the
I need to parse a simple HTML page with a simple form in it.
I have a HTML table inside which I have a submit button. Now, I
I'm using javascript to submit a form to a webservice which returns a json
I have a form which allows users to comment on a page, however they
I have a form which pops up in an overlay for a simple call
I have three forms on one page - callback, contact us and newsletter subscription.
I have a form which I'm putting in a IFrame within a page. The

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.