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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:40:55+00:00 2026-06-17T10:40:55+00:00

Our site has a form that is injected into a jQuery dialog. Upon entering

  • 0

Our site has a form that is injected into a jQuery dialog. Upon entering form data and clicking the submit button (a jQueryUI dialog button), the form is first validated by javascript then submitted to the server. I have found that after pasting in a value to the one textbox that is mandatory and submitting, occasionally when I open the form the next time, it attempts to submit immediately without the user clicking the button (I verified this with debugger statements just before every instance of .submit() which were hit only when form submission happened with a button click).

Has anyone else encountered an instance of unintended form submission, and other than server side validation was there any way you could combat it?

Just to be clear, the order of events are as follows:

  1. User clicks the Add button which gets the form (partial view) and injects it into the dialog, then opens the dialog.
  2. User pastes a value into the mandatory textbox (there are several other controls).
  3. User clicks the Submit button which performs low level validation and submits the form via ajax, closing the dialog after success.
  4. Rinse and repeat until:
  5. User clicks the Add button which gets the form and injects it into the dialog, which opens and them immediately submits, failing validation on the server.

Form.submit callback

    $("#SearchEdit>form").submit(function (e) {
        if (TermPresent()) {
            return true;
        } else {
            e.preventDefault();
            return;
        }
    });

function TermPresent() {
    return ($("textarea#MySearch_SearchTerms").val() != "" ? true : 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-17T10:40:56+00:00Added an answer on June 17, 2026 at 10:40 am

    You could change type="submit" to type="button", then summit from the bottom of your validation code instead of allowing the form to submit itself.

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

Sidebar

Related Questions

Our site has some very complicated form controls that are submitted and then show
I have a Drupal site, site.com , and our client has a campaign that
Our web-designer just finished up our site, and it has an HTML Form with
We have a number of forms on our site that are shown with jquery
The back end dev for our site has a div.errors for form handling, it
On our site we are using an embedded sign-up form from our ESP that
Our site creates files on-the-fly that present user-specified data to the world on the
There are 3 authors in our company blog, each author has own site url
I'm having some trouble POSTing data from a client machine to our internal site
Our site is using ASP.Net Membership. I have a page which literally has nothing

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.