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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:33:30+00:00 2026-05-23T11:33:30+00:00

my error message below, with a highlighted field is working perfectly. Except now the

  • 0

my error message below, with a highlighted field is working perfectly. Except now the powers that be want a different functionality.
Currently the error messaging highlights the field with a red border, and on focus the border is removed. However, now the powers that be want the red highlighting to persist until the user hits submit onclick="return formSubmit()"

I’ve tried using a .submit function (removing the unbind and remove focus from the .focus function, but the red highlighting persists regardless.

<!--Jquery function to override JS alert with DOM layer alert message-->
function customAlert(inputID,msg){
   var div = $(".errorPopup");
   div.css({"display":"block"});
   $("#"+inputID).addClass("CO_form_alert").parent().addClass("alertRed");
   if (div.length == 0) {
     div = $("<div class='errorPopup' onclick='$(this).hide();'></div>");
     $("body").prepend(div);
   } 
   div.html(msg);
   $("#"+inputID).focus(function(){
        $(this).unbind('focus'); // remove this handler
        $(this).removeClass("CO_form_alert")
               .parent().removeClass("alertRed"); // undo changes
        $('.errorPopup').hide(); // hide error popup
   });

}
  • 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-23T11:33:30+00:00Added an answer on May 23, 2026 at 11:33 am

    I was so narrow minded in my looking for a solution above – trying to tie the removeClass with the form submit (which had to many actions tied into it and would have been overly complicated).

    Instead, I just did a remove class at the beginning of the error checking:

    $("li").removeClass("alertRed");
    $("input").removeClass("CO_form_alert");  
    $("select").removeClass("CO_form_alert"); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting this error message with the code below: class Money { public: Money(float
We're seeing the error message ORA-00936 Missing Expression for the following SQL: Note that
I have a huge XML file (114 KB/1719 lines; see the error message below
Very famous error message (see below), judging by the number of Google results. But
I have been getting an error message that I can't resolve. It originates from
I have a form in which validation error message needs to be displayed below
The error message below i get when Im trying to create a new user
I got the error message below, and I found a solution to it was
I got this error message below: ld: file not found: ../three20/Build/Products/Debug-iphonesimulator/libThree20UICommon.a collect2: ld returned
I am getting the error message below when I try to compile my code

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.