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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:22:39+00:00 2026-05-31T06:22:39+00:00

I’ve looked at posts that ask how to do this, but I’m new to

  • 0

I’ve looked at posts that ask how to do this, but I’m new to JQuery so I may be missing something that would help with how my form is set up.

I have a classic asp page with a search box that has a watermark “Employee Last Name” in the text box. I want to validate this field as required. The watermark is working fine, and the validation works fine, but won’t validate properly if the watermark is there. I guess it’s seeing the watermakr as an entered value?

Any tips on how I can keep my watermark and still validate this field? Here’s the code I’m using:

<script type="text/javascript">
//Form watermarks
    $(document).ready(function() {
        $('.watermarked_title').watermark('watermark');
    });
    </script>


    <script>
//Validation
    jQuery(document).ready(function(){
        // binds form submission and fields to the validation engine                    
        jQuery("#SearchForm").validationEngine();
    });

    </script>

Form code:

<form action="EmpSearch.asp" method="Post" id="SearchForm">                         
    <input name="SearchLN" id="SearchLN" type="text" size="22" class="validate[required] searchBox watermarked_title" title="Employee Last Name" >&nbsp;&nbsp;
    <input type="submit" class="button" Value="Search">                     
</form>
  • 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-31T06:22:40+00:00Added an answer on May 31, 2026 at 6:22 am

    The watermark value should be cleared before submit:

    Form submission – The plugin automatically cleans up all watermarks prior to form submission, so you should never need to manually remove watermarks before submit.

    If you use it right…:

    Using the Watermark and Validate plugins on the same elements

    If you find that your form validation is failing because the watermarks are
    not being cleared before validation occurs, then you need to adjust
    the order in which you set up the watermarks and validation.

    The proper order is to always set up watermarks before anything else
    — especially before validation. That’s because jQuery carefully controls the order of events during form submission, and calls them in
    the order they were set up. If you set up validation first, then the
    form will be validated before the watermarks are cleared.

    Setting up watermarks and validation in the proper order is as simple
    as placing the lines of code in the correct order, like in the
    following example:

    $('#myElement').watermark('Required');
    $('#myForm').validate();
    

    source

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
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

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.