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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:08:26+00:00 2026-05-23T13:08:26+00:00

I am using Ajax with jQuery to submit a webform. When the webform submits

  • 0

I am using Ajax with jQuery to submit a webform. When the webform submits a nice thank you message comes up. The message covers the form itself and will provide the user with information on what to do next etc. The issue is that the form can have several fields and when the user hits submit they see the form disappear but that is about it.

I added some JS that would kick the user to the top of the page (and see the thank you message at the top) but still there can be a lot of blank space where the form was.

The question I have is how would I go about having the form change from its starting state to display:none; while the confirmation message shows in its place.

Here is a copy of my code:

function jqsub() {

var $j = jQuery.noConflict();
var $jform = $j('#ajaxform'); // form ID
var $jmessagebox = $j('#ajaxdiv'); // message box ID
var $jsuccessmessage = "<h3>Thank You For Your Submission!</h3>"; // success message in HTML format
var $jerrormessage = "<h3>Error - Please Try Again</h3>"; //error message in HTML format

$j.ajax({
    type: 'POST',
    url: $jform.attr('action'),
    data: $jform.serialize(), 
    success: function (msg) { 
                        if (msg.FormProcessV2Response.success) {
                        $jmessagebox.append($jsuccessmessage) 
                        $jmessagebox.fadeIn();
                        }
                        else {
                        $jmessagebox.append($jerrormessage) 
                        $jmessagebox.fadeIn();  
                        }    
                },
    error: function (msg) {
                        $jmessagebox.append($jerrormessage) 
                        $jmessagebox.fadeIn();
                },
     });
$j( 'html, body' ).animate( { scrollTop: 0 }, 0 );
}

Here is the page I am working with: http://ubhape2remodel.businesscatalyst.com/testform.html

One other note: If there is an error on the form what is a simple way to have the Error message go away and the form show again? (Basically swapping states back to where the form shows vs the message) Thanks again for your help!

Hope all of that makes sense.

I welcome any advice, ideas, and help.

Thanks!

Lynda

  • 1 1 Answer
  • 2 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-23T13:08:26+00:00Added an answer on May 23, 2026 at 1:08 pm

    You could fade your form out slowly and then show the mesage:

    $jform.fadeOut("slow", function(){
      $jmessagebox.fadeIn("slow");
    });
    

    Hope this helps. Cheers

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

Sidebar

Related Questions

When using jQuery 's ajax method to submit form data, what is the best
i'm trying to submit my Ajax form using jQuery. However calling the submit() function
i'm using ajax form jquery plugin to submit a form (in a dialog) via
I am using ajax form submit. Here, i am using jQuery serialize .I like
i want to submit a form with about 10 input using jquery/ajax,but i don't
I'm making a form submit with jQuery's AJAX. I'm having several form's using AJAX
I'm trying submit some form using ajax //include jquery-1.4.2.min.js var submitForm = document.createElement(FORM); ...
I'm using Jquery to submit the value of a <textarea> through AJAX to a
I am trying to submit data using Jquery AJAX (using the following script) and
I have a login form using jquery ajax and a php code. The issue

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.