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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:30:31+00:00 2026-05-25T02:30:31+00:00

I have the following form <form id=myform method=post action=#> <div class=fields> <fieldset class=ui-widget ui-widget-content

  • 0

I have the following form

<form id="myform" method="post" action="#">
    <div class="fields">
        <fieldset class="ui-widget ui-widget-content ui-corner-all">
            <legend class="ui-widget ui-widget-header ui-corner-all">&nbsp;Customer properties&nbsp;</legend>
            <input type="hidden" id="CustomerID" name="CustomerID"  value="${CustomerID}" />
            <br />
            <table width="100%" border="0" cellpadding="3" cellspacing="1">
            <tr valign="top">
                <td><label for="Code">Customer Code</label></td>
                <td><input type="text" id="Code" name="Code" value="${Code}" class="ui-widget-content" style="width:140px" /></td>
            </tr>
            <tr valign="top">
                <td><label for="CustomerName">Name</label></td>
                <td><textarea id="CustomerName" rows="2" cols="40" name="CustomerName" class="ui-widget-content">${CustomerName}</textarea></td>
            </tr>
            ...
            </table>
            <br />
        </fieldset>
    </div>
    <div style="text-align:right; padding: 8px 0px 0px 0px;">
        <input type="submit" id="btnSave" name="btnSave" class="button" value="Save" />
        <input type="button" id="btnCancel" name="btnCancel" class="button" value="Cancel" />
    </div>
</form>

on which I apply jQuery validation through the following code

$('#myform').validate({
    errorElement: 'span',
    errorPlacement: function (error, element) {
        error.html($('<img alt="" src="error.png" />').attr('title', error.html())).insertAfter(element);
    },
    rules: {
        ...
    },
    messages: {
        ...
    },
    submitHandler: function (form) {
        saveCustomer(form);
    }
});

This code works very nice the first time is being executed (when I press the submit button) and the image appear regularly immediately after the input text. Anyway when I tab to another edit the image disappear and I can see again the text around the edit. What I am doing wrong?

  • 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-25T02:30:32+00:00Added an answer on May 25, 2026 at 2:30 am

    see here– you can use the errorElement option to create your custom error display,
    invalidHandler method (I think) to disable the group messages part.
    you can use errorPlacement to control how the error is displayed (untested example):

    $("#myform").validate({
      errorPlacement: function(error, element) {
           element.append('<img source=".." title="' + error.text() +'" />');
       }
     })
    

    this should create an image with a tooltip containing the error message.

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

Sidebar

Related Questions

I have the following form <form name=myForm id=myForm method=post enctype=multipart/form-data action=script.php> and this jQuery
I have a (django-generated) form with the following content: <form action=./ id=my_form method=post> ...
I have the following dropdown box <form name=myform method=POST ACTION=songs.php> Select Category: <select id=sel
I have a form with the following HTML below: <form id=course_edit_form name=course_form action=/courses/save method=post>
I have an included object's form: <form method=post class=object_form id=event-core-form action={% url save_event_core_data event.id
Consider the following form: <form action="/a" method="post"> <input name="x" type="text" onblur="myonblur(e)" /> <input name="y"
I have the following in an html form using method Post. <input type=submit title=
I have the following form code: # forms.py class SomeForm(forms.Form): hello = forms.CharField(max_length=40) world
I'm looking at some Java classes that have the following form: public abstract class
I have done the following form <% form_for @anexo, :url => {:action => create},

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.