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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:12:38+00:00 2026-05-31T05:12:38+00:00

I am creating a popup jquery ajax comment form using the jquery validation plugin.

  • 0

I am creating a popup jquery ajax comment form using the jquery validation plugin. Currently, the ajax is returning “this field is required” under the html form fields. How can I get the jquery to return this response inside the form fields as a blur/focus event?

Here is the js that controls the event:

  <script>
    $(document).ready(function() {
        $('#commentForm').validate({
            submitHandler: function(form) {
                $.ajax({
                    type: 'POST',
                    url: 'process.php',
                    data: $(this).serialize(),
                    success: function(returnedData) {
                        $('#commentForm').append(returnedData);
                    }
                });         
                return false;
            }
        });
    });
  </script>

The html form is configured like:

<form class="cmxform" id="commentForm" method="POST" action="">
   <p>
     <label for="cname">Name</label>
     <input id="cname" type="text" name="name" size="60" class="required" minlength="2" />
   </p>
   <p>
     <label for="cemail">E-Mail</label>
     <input id="cemail" type="text" name="email" size="60"  class="required email" />
   </p>
   <p>
     <label for="curl">URL</label>
     <input id="curl" type="text" name="url" size="60"  class="url" value="" />
   </p>
   <p>
     <label for="ccomment">Your comment</label>
     <textarea id="ccomment" type="text" name="comment" cols="72" rows="8"  class="required"></textarea>
   </p>
   <p>
     <div id="button2"><input class="submit" id="submit_btn" type="submit" value="Send Email"/></div>
   </p>
</form>

Thank you.

  • 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-31T05:12:39+00:00Added an answer on May 31, 2026 at 5:12 am

    To solve this problem, I used a combination of the errorPlacement and fadeOut functionalities in jQuery. This is the working solution:

    $('#commentForm').validate({
        submitHandler: function(form) {
            $.ajax({
                type: 'POST',
                url: 'process.php',
                data: $(this).serialize(),
                success: function(returnedData) {
                    $('#commentForm').append(returnedData);
                }
    
            });
            return false;
        },
        errorPlacement: function(error, element) {
            error.insertAfter(element).position({
                my: 'right top',
                at: 'right top',
                of: element
            });
            error.fadeOut(3000);
        },
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a popup jquery ajax comment form using the jquery validation plugin.
I am creating a jquery ajax popup comment form, but am having a problem
I am creating a comment form based on the jquery validation plugin ( http://docs.jquery.com/Plugins/Validation
I have succeed creating a popup using this code in c# and wpf <Popup
I read this article regarding creating popup notes with javascript and css The problem
I'm creating a popup window with no URL source using window.open(). I don't give
Google Chrome seems to be blocking a popup I am creating via jQuery. After
I am having a problem with my jquery form. If you look at this
I am creating popup windows using window.open and setting the height and width of
I need assistance with creating a jquery function that will display a popup message

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.