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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:10:27+00:00 2026-05-25T15:10:27+00:00

Using an HTML5 form with new type (email, url, etc), I have binded the

  • 0

Using an HTML5 form with new type (email, url, etc), I have binded the submit event with a JS function.

The problem is that the browser first call this function, and then call its validation system, but only if the submit function hasn’t returned false.

Or, I do the Ajax request and all the work in that function, meaning I always return false.

How could I enable the browser validation to be executed before the call of the submit js function ?

Thanks for your 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-25T15:10:28+00:00Added an answer on May 25, 2026 at 3:10 pm

    From specification the browser should first validate the form and then, if the form is valid should trigger a submit event. This means, that you simply should be able to do your Ajax submit inside the submit event.

    Currently Opera does first fire the submit event and then does the validation. You can simply call manually the validation inside of your submit listener, using checkValidity-method:

    $(form).bind('submit', function(){
        if(!this.checkValidity || this.checkValidity()){
            //do ajax and return false
        }
    });
    

    Note: that this can doubble the invalid events in those browsers, too. If you don’t use them, evrything should be fine. If you want to use them and don’t want them doubbled you can use webshims lib, which fixes this and other issues in different browsers.

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

Sidebar

Related Questions

sorry, I have another problem now. I'm using a new php form method than
In HTML5 there is a new tag <input type=email> when I am using it
I have a form that validates using jquery. The form's id is contact and
I have an image upload form <% using (Html.BeginForm(PictureValidateAndSave, UserGallery, new {}, FormMethod.Post, new
I am using html, javascript & mod_python. I want to submit html form. To
Hey, I'm using a html form that is used to log people into my
I have a simple form with some plain html input like bellow using ASP.NET
I would like to have a simple login form (or any form for that
Html5 has new attributes like the novalidation attribute for the form element and the
I have a problem with HTML form and Jquery. The simplified version looks like

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.