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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:08:35+00:00 2026-05-31T05:08:35+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. Why does the ajax work differently for the comment field versus the name and email fields? When the user begins typing in the comment field, the ajax response “this field is required” is removed. I would like this to also happen for the name and email fields, but they remain until the user clicks submit. How do I get the name and email fields to behave like the comment field?

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>

Thanks.

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

    I solved this problem by utilizing the errorPlacement function in jQuery. Not specifying a errorPlacement for these elements was causing a conflict in my js.

    Here is the way that I solved my issue:

    $('#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'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 have succeed creating a popup using this code in c# and wpf <Popup
I need assistance with creating a jquery function that will display a popup message
I'm creating a small web page using jquery-ui-1.8 which is having a frameset and
i'm using the DataTables plugin for JQuery, my problem basically lies in the fact
I found WaitForPageToLoad,WaitForCondition and popup. I have an ajax request which is creating some

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.