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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:59:00+00:00 2026-05-25T16:59:00+00:00

I have a form which looks like this @using (Html.BeginForm(ActionMethod,MyController FormMethod.Post)) { <button type=submit

  • 0

I have a form which looks like this

@using (Html.BeginForm("ActionMethod","MyController FormMethod.Post)) {
 <button type="submit" value="Generate" name="action" class="button" id="btnGenerate">Generate Form</button>
 <button type="submit" value="Confirm" name="action" class="button" id="btnConfirm">Confirm</button>
}

and my javascript looks like this

 <script type="text/javascript">
     $(function () {

         var genOverlay = jQuery('<div id="overlay"><div class="innerblock box-shadow"><p>Please remember to print the registration form and sign both copies.</p><div><a id="btnClose" href="#" class="button">Close</a></div></div>');

         var confirmOverlay = jQuery('<div id="overlay"><div class="innerblock box-shadow"><p>Changes can not be made to this record once it has been confirmed. Are you sure you would like to confirm this form?</p><div> <a id="btnConfirmConfirmation" href="#" class="button">Confirm</a> <a id="btnCancel" href="#" class="button button-red">Cancel</a></div></div>');

         $('#btnGenerate').click(function () {
             genOverlay.appendTo(document.body);
             return false;
         });

         $('#btnConfirm').click(function () {
             confirmOverlay.appendTo(document.body);
             return false;
         });


         $('#btnConfirmConfirmation').live('click', function () {
             // Need help on submitting the form with the input button value of btnConfirm.

             // $('#btnConfirm').submit(); does not work
             // return true;
         });

         $('#btnClose').live('click', function () {
             genOverlay.remove();
         });

         $('#btnCancel').live('click', function () {
             confirmOverlay.remove();
         });
     });
</script>

How would i go about implementing btnConfirmConfirmation click on the overlay to just submit the form normally with the action value of “Confirm”?

Thanks for any help

  • 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-25T16:59:01+00:00Added an answer on May 25, 2026 at 4:59 pm

    submit is an event handler of the form element. This should work:

    $('#btnConfirm')[0].form.submit()
    //All form elements have a property called "form" which refers to the parent form
    

    If you’ve attached an identifier to your form, use this:

    $('#formId').submit();               //<form id="formId" ...
    $('form[name="formName"]').submit(); //<form name="formName" ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 tables which in simplified form look like this: Products( id: int,
Well i have a complex form view model like this : public class TransactionFormViewModel
I have a script with which I POST data to a server using cURL.
Using jQuery/jQueryUI I want to populate a form using this HTML/JS show below. The
I have a site, from which you can download an HTML file. This HTML
I am using jQuery.load() to render a partial view. This part looks like this:
I have a form in HTML which when submitted makes a call to the
I have a form which is used to insert/display and update . In the
I have a form which takes both the user details and an image uploaded
I have a form which has a lot of SELECTs. For various reasons, I'd

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.