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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:33:40+00:00 2026-06-13T13:33:40+00:00

I am trying to return an error message each the the user leaves the

  • 0

I am trying to return an error message each the the user leaves the password field blank but it doesn’t seem to be working. How do I go about doing this? I am using jQuery validation along with the latest jQuery plugin – having followed the example here: http://docs.jquery.com/Plugins/Validation.

Here is my code so far: http://jsfiddle.net/k6cvb/.

HTML

<div id="logo_box"></div>
<form action="#" id="login_form" method="post">
  <div id="login_box">
    <div style="width: 100%;">Department<br />
      <select style="width: 250px; padding-left: 5px;" class="required">
        <option selected="selected">CO</option>
      </select>
    </div>
    <br />
    <div style="width: 100%; padding-bottom: 20px; ">Password<br />
      <input id="field" type="password" style="width: 243px;  padding-left: 5px;" class="required"/>
    </div>
    <div style="float: left; padding-top: 6px;"> <a id="forgotpass_link">Forgot your password?</a></div>
    <div style="float:right">
      <input id="login_btn" type="submit" value="Log in"/>
    </div>
  </div>
  </form>
  <div align="center" id="footer">
  </div>​

CSS

body {
    margin: 0;
    font-family: Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: #a0a0a0;
    border-top: 3px solid #EAEAEA;

}
#logo_box {
    margin: auto;
    width: 110px;
    margin-top: 50px;
    padding-bottom: 20px;
}
#login_box {
    width: 250px;
    height: 155px;
    margin: auto;
    padding: 20px;
    font-size: 14px;
    margin-top: 1px;
    background-color: #F0F0F0;
    color: #333;
    border: 1px solid #E1D0E8;
}
select, #field {
    border: 1px solid #DDD;
    height: 30px;
    font-size: 14px;
}
#login_btn {
    border: 1px solid #DDD;
    height: 30px;
    font-size: 14px;
    width: 80px;
    font-weight: bold;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;    
    background: #F6F6F6;
    color: #ABABAB;
}

#login_btn:hover {
    border: 1px solid #C06;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;    
    background: #C06 ;
    color: #fff;
    cursor: pointer;
}

#login_btn:active {
    border: 1px solid #C06;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;    
    background: #fff;
    color: #C06;
    cursor: pointer;
}

#forgotpass_link {
    color: #306;
}

#forgotpass_link:hover {
    color: #C06;
    cursor: pointer;
}

#footer {
    padding-top: 15px;
    font-size: 12px;
}​

JS

  $(document).ready(function(){
    $("#login_form").validate();
  });​

Thanks

  • 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-13T13:33:41+00:00Added an answer on June 13, 2026 at 1:33 pm

    your input tag has no name attribute… please check..add that and it works

    input id="field" type="password" style="width: 243px;  padding-left: 5px;" class="required" name="password"/>  // added name filed.. password in this case
    

    Please note that :

    The name attribute is used to reference elements in a JavaScript, or to reference form data after a form is submitted.

    Only form elements with a name attribute will have their values passed when submitting a form.

    try this fiddle…

    http://jsfiddle.net/k6cvb/16/

    CSS

    label.error { float: none; color: red; padding-left: .5em; vertical-align: top; } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am noticing a error when im trying to return json from a fetchAll.
Am trying to return the sum of each day of a week in mysql
I am trying to return the value by using unix_timestamp function but it behaves
I am trying to return two json sets from java which each contain key/value
I am trying to return an error using jquery post function to retrieve the
I am trying to figure out how to notify the user which field failed
I'm trying to get the error message out of a custom data attribute JQuery
I am trying to remove an Entry field after a user gives his/her name,
Im trying to return the value that a $ajax call returns, from a function
Im trying to return a SimpleQuery list that queries a single table and uses

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.