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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:18:13+00:00 2026-06-09T17:18:13+00:00

I am trying to submit the form with jquery. I am using bootstrap modal

  • 0

I am trying to submit the form with jquery. I am using bootstrap modal window. Here is a js fiddle. Am i missing something? thanks alot

Update: I am trying to submit the form using ajax.
I also tried but not luck.

$('#comment_form').on('submit', function(){

  $.post("/yourReceivingPage", $(this).serialize(), function(){

  // Hide the modal
    $("#my-modal").modal('hide');

  });

  // Stop the normal form submission
  return false;
});
  • 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-09T17:18:14+00:00Added an answer on June 9, 2026 at 5:18 pm

    You refer to the wrong element, I have a working example for you, please check and let me know if it works for you:

    $(document).ready(function() {
        $('#comment-form-submit').click(function() {
            $('#comment_form').submit();
            alert('Handler for .submit() called.');
            return false;
        });
    });​
    

    jsFiddle Working Demo

    And for AJAX solution you need to refer to familiar and already discussed issue:

    jquery serialize and $.post

    Edited: Referring to your question about how to extract the ID of the clickable link, this code will do it for you:

     $(document).ready(function() {
       $(".comments.no").mouseover(function() {
         myDivsId = this.id;  // as you mouse over on the link it will be stored in Global Var and then transferred anywhere you wish.
       });
         $('#comment-form-submit').click(function() {
           $('#comment_form').submit();
           alert('Handler for .submit() called + div\'s ID = ' + myDivsId);
           return false;
       });
    

    });​

    jsFiddle live demo

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

Sidebar

Related Questions

i'm trying to submit my Ajax form using jQuery. However calling the submit() function
I'm trying to submit a form when a select changes using jQuery Mobile. I
I'm trying to get the value of a form field on submit using jQuery.
I am having two problems. First: Trying to submit this form using jquery. When
I'm trying to submit form data with jQuery. I'm using ASP.NET WebMatrix. In a
I am trying to submit a form using jQuery's .ajax() function. It seems like
I am trying to submit a form thru javascript on the fly (using jquery-form)
I am trying to submit a form by using jquery automatically after page load
I'm trying to create a form with a submit button via jQuery using append().
I am trying to submit a form using JQuery to a PHP page. But

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.