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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:51:14+00:00 2026-05-13T11:51:14+00:00

Trying my hand with jQuery. I have this strange situation that i wish to

  • 0

Trying my hand with jQuery. I have this strange situation that i wish to understand. The below script “works”, only problem is not exactly the way i want it to.

Currently on page load. If i click on one of the input fields and without entering anything, tab to the next field (i.e press the tab key and go to next field), the validation is not fired. So essentially i can hit two tabs and click the submit button. This goes through (will get caught server side,but kind of defeats the purpose).

If i enter something and then delete it though, it fires the validation and even shows the message correctly.

My questions:

  • How do i get the validations to fire as soon as i “exit” the field, meaning if i click inside or get into the field through a tab, and then “leave/exit” that form field, the validation should be fired.

  • What’s the deal with getting the validation to fire on submit? do i have to put an onSubmit or is there a event handler sort of thingy for validations (this i believe can be solved with a little more intense googling and api reading), but would you be so kind 🙂 ?

    <style type="text/css">
      .style3 {font-size: 14px; font-weight: bold; color: #0099CC; }
      form{margin:0;}
    .error {
        font: normal 10px arial;
        padding: 3px;
        margin: 3px;
        background-color: #ffc;
        border: 1px solid #c00;
    }
    </style>
    <script src="http://code.jquery.com/jquery-latest.js"></script>
    <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js"></script>
    
    <script type="text/javascript"> 
    // jQuery validation
     $(document).ready(function() { 
        $("#advanceValidateform").validate(); 
    }); 
    </script> 
    
    
      <form id="advanceValidateform" name="advanceValidateform" style="margin:0"  action="">     
        <input type="text" id="advanceAmt1" name="advanceAmt1" class="required"  /> <br />
        <input type="text" id="advanceAmt2" name="advanceAmt2" class="required"  /> <br />
        <input type="text" id="advanceAmt3" name="advanceAmt3" class="required"  /> <br />
    </form>
    
    <table width="100%" class="hr-table">
        <tr height="1">
            <td colspan="4" align="center" >
                <form action="#" method="POST" >
                    <input type="hidden" name="empno" value="9999" ></input>
                    <input name="submit" type="submit" title="submit the form" value="  Submit and Print  "></input>
                </form>
            </td>
                </tr>
    </table>
    
  • 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-13T11:51:15+00:00Added an answer on May 13, 2026 at 11:51 am

    If you simply tab through it the .change() event is not fired. IF you wish to force this, you can capture the .focus() and use .trigger() to fire the change event.

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

Sidebar

Related Questions

I have spent hours trying to figure this problem and i just can't, so
I have a situation that I'm trying to make work with an array ,
I'm trying to make a function that will take short hand hex color to
I'm trying my hand at jQuery Address http://www.asual.com/jquery/address/ On a click event I set
I have been trying to figure this out, and since I can't find any
I'm trying to connect jQuery UI's datepicker with a select list. I have found
Hi please look at the HTML below. I am trying to use jQuery to
I have a problem here, i want the left hand side menu to slide
I have a simple HTML page (ratings.html) that I'm trying to test using HtmlUnit.
I'm trying my hand in designing an application in JavaScript that is object oriented

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.