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

The Archive Base Latest Questions

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

I’m using bassistance validation plugin for jQuery. To hold the form clear I place

  • 0

I’m using bassistance validation plugin for jQuery.

To hold the form clear I place only one letter as Errormessage after the invalid field (for example "F" for invalid formatting). Now I want to give the user an option for a detailed errormessage in a special div (#errordetails) by clicking on letter.

$(".contactForm").validate({
    rules ....
}),

...

I want to place something like that:

$("label.error").click(function() {
    alert("The Errormessage was clicked ...");
})

Where do I have to place this code?

In $(document).ready() the events don’t work. Click events for other elements are working fine, but not events for the $("label.error")

My HTML after validation:

<div class="formField cf">
  <label for="contactGeburt">Geb.datum *
    <span style="font-size: 10px; color: #999">&nbsp;(dd.mm.jjjj)
    </span>
  </label>
  <input type="text" maxlength="10" id="gebdatum" name="gebdatum" class="textField datum error">
  <label for="gebdatum" generated="true" class="error">
    <span class="errorvalue">P
    </span>
  </label>
</div>

And here is the jQuery Part

$(document).ready(function() {
  $(".contactForm").validate({
      rules: {
        gebdatum: {
          required: true,
          dateDE: true
        }
      },
    }),

    //This does not work
    $(function() {
      $("label.error").click(function() {
        alert("The Errormessage was clicked ...");
      });
    });

  // This works - H1 is also on the document ;-)
  $(function() {
    $("h1").click(function() {
      alert("H1 was clicked ...");
    });
  });
});

I’ve tested the (valid) code, but it doesn’t work. I’ve started the demo page from bassistance:

http://jquery.bassistance.de/validate/demo/

I paste this function:

$("label").click(function() {
  alert("The Label was clicked ...");
});

And run the code (console). On clicking the labels from the textfields the alertmessage was shown. After clicking on "submit"-button the errorlabels (red) do not react on the event but the labels for the input fields show the alertbox.

So I run the code from the console again (after the errors are on the screen) and now the alterbox was shown.

So I think, the event must be placed in the validate-event from the form but I don’t know the right syntax.

Here is a link to JSFiddle with all resorces included: http://jsfiddle.net/frank79/HVEXm/

  • 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-27T20:10:08+00:00Added an answer on May 27, 2026 at 8:10 pm

    I’ve got the solution:

    $(".contactForm").delegate("label", 'click', function() {
        alert("A Label was clicked....");
    }).validate({
        rules: {
            gebdatum: {
                required: true,
                dateDE: true
            }
        }
    })
    

    My label didn’t exist when calling the click-handler.

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

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
I'm making a simple page using Google Maps API 3. My first. One marker
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I want use html5's new tag to play a wav file (currently only supported
We're building an app, our first using Rails 3, and we're having to build

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.