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

  • Home
  • SEARCH
  • 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 8925277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:39:06+00:00 2026-06-15T07:39:06+00:00

I have a simple login form like below, with an attached jQuery script. I’m

  • 0

I have a simple login form like below, with an attached jQuery script. I’m trying to make some simple client-side form validation using jQuery. I can’t seem to get the blur event to fire, however. I can’t think of what I’m doing wrong, I’ve tried using ‘.on(‘blur’, fn(){})’ but that doesn’t work either. Please help!

Here’s my HTML file:

<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title>DMIT 222 - Catalogue Project: Admin Login</title>
        <link rel="stylesheet" type="text/css" href="../styles/divs.css" />
        <link rel="stylesheet" type="text/css" href="../styles/fonts.css" />
        <link rel="stylesheet" type="text/css" href="../styles/tags.css" />
        <link rel="stylesheet" type="text/css" href="../styles/tables.css" />
        <link rel="stylesheet" type="text/css" href="styles/forms.css" />
        <script src="http://code.jquery.com/jquery-latest.js"></script>
        <script src="../scripts/loginFormValidation.js"></script>
    </head>
    <body>
        <div id="wrapper">
            <header>
                <h1>Ship Catalogue</h1>
            </header>
            <div id="mainContent">
                <form id="LoginForm" name="LoginForm" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
                    <div class="FormRow"><label for="Username">Username:</label><input type="text" name="Username" id="Username" /><p id="userErrors"><?php echo $userErrors; ?></p></div>
                    <div class="FormRow"><label for="Password">Password:</label><input type="password" name="Password" id="Password" /><p id="passwordErrors"><?php echo $passwordErrors; ?></p></div>
                    <div class="FormRow"><input type="submit" name="Submit" value="Login!" /></div>
                </form>
            </div>
            <footer>
                <a href="http://www.logicanddesign.ca/">Site Developed by Logic &amp; Design</a>
            </footer>
        </div>
    </body>
</html>

And here’s the loginFormValidation.js script:

$("#Username").blur(function(e){
    alert();
    if ($("#Username").val() == "") {
        $("#userErrors").text("Username must be entered!");
    }
});

$("#Password").blur(function(e){
    if ($("#Password").val() == "") {
        $("#passwordErrors").text("Password must be entered!");
    }
});
  • 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-15T07:39:07+00:00Added an answer on June 15, 2026 at 7:39 am

    Either add your jquery blur code inside

    $(document).ready(function() { ...// your blur code here }
    

    OR
    at bottom of your page above closing body tag like:

    <script type="text/javascript">
    //your blur code
    </script>
    
    </body>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple login form and have jQuery validate replacing the field labels
I would like to have a simple login form (or any form for that
There are some HTML based games (ie bootleggers.us) that have a simple login form
I have simple login form I am using SQLite database which has fields like
I'm trying to make a simple login with JSP, and I have a custom
so I have a simple login page like this: <fieldset> <legend>Verification</legend> <form method=post action=authentication.php>
I have a fairly simple login form that is submitted with a jQuery AJAX
Basically I have a simple login form. In the database I have a 'last_logged'
I have a simple html login form which is validated with javascript before its
I have a simple app where you can login it looks like this: {{#view

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.