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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:42:59+00:00 2026-05-24T11:42:59+00:00

I’m testing the JQUery Tools and trying to get a modal form working with

  • 0

I’m testing the JQUery Tools and trying to get a modal form working with their validation setup.

I have a CSS issue in that the error messages from validation don’t disappear on closing the modal form.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html> 

<head> 
    <title>jQuery modal form test</title> 
    <!-- include the Tools --> 
<script src="http://jquery.bassistance.de/validate/jquery.validate.js"></script>
<script src="http://cdn.jquerytools.org/1.2.5/full/jquery.tools.min.js"></script>   

    <!--- add styles --->
<link rel="stylesheet" type="text/css" href="http://static.flowplayer.org/tools/demos/validator/css/form.css"/>


<style>
    .modal {
        background-color:#fff;
        display:none;
        width:450px;
        padding:15px;
        text-align:left;
        border:2px solid #333;

        opacity:0.8;
        -moz-border-radius:6px;
        -webkit-border-radius:6px;
        -moz-box-shadow: 0 0 50px #ccc;
        -webkit-box-shadow: 0 0 50px #ccc;
    }

    .modal h2 {
        background:url(/img/global/info.png) 0 50% no-repeat;
        margin:0px;
        padding:10px 0 10px 45px;
        border-bottom:1px solid #333;
        font-size:20px;
    }

    /* error message */
.error {
    height:15px;
    background-color:#FFFE36;
    font-size:11px;
    border:1px solid #E1E16D;
    padding:4px 10px;
    color:#000;
    display:none;   
    z-index: 10000;
    -moz-border-radius:4px;
    -webkit-border-radius:4px; 
    -moz-border-radius-bottomleft:0;
    -moz-border-radius-topleft:0;   
    -webkit-border-bottom-left-radius:0; 
    -webkit-border-top-left-radius:0;

    -moz-box-shadow:0 0 6px #ddd;
    -webkit-box-shadow:0 0 6px #ddd;    
}
    </style>
</head> 

<body> 

<p> 
    <div id="loginMenu">
<a href class="modalInput" rel="#register">Register</a>
    </div> 
</p> 

<div  class="modal" id="register">
<!-- signup form-->
    <form id="myform"  autocomplete="off" method="get" action=""  novalidate="novalidate">

    <fieldset>
    <p>
    <label>email *</label>
    <input  type="email" name="email" placeholder="email..." required="required"/></p> 
    <p>
    <label>username *</label>
    <input type="text" name="username" placeholder="username..." pattern="[a-zA-Z]{5,}" required="required"/>       
    </p>
    <p>
    <label>password *</label>
    <input type="text" name="password" placeholder="password..." />     
    </p>
    <p>
    <label>confirm password *</label>
    <input type="text" name="password2" placeholder="password..." />        
    </p>
    <p>
        <button type="submit">Sign Up</button>
        <button type="button" class="close"> Cancel </button>
    </p>
       </fieldset>
    </form>
</div>

<script> 
$(document).ready(function() {

var triggers = $(".modalInput").overlay({

    // some mask tweaks suitable for modal dialogs
    mask: {
        color: '#ebecff',
        loadSpeed: 200,
        opacity: 0.9
    },

    closeOnClick: false
});

// initialize validator and add a custom form submission logic
$("#myform").validator().submit(function(e) {

    var form = $(this);

    // client-side validation OK.
    if (!e.isDefaultPrevented()) {

        // submit with AJAX
        $.getJSON("processSignup.cfm?" + form.serialize(), function(json) {

            // everything is ok. (server returned true)
            if (json === true)  {
                // close the overlay
                triggers.eq(0).overlay().close();
                $("#loginMenu").html("<a href='logout.cfm'>Log out</a>");

            // server-side validation failed. use invalidate() to show errors
            } else {
                form.data("validator").invalidate(json);
            }
        });

        // prevent default form submission logic
        e.preventDefault();
    }
});



});
</script> 

</body> 

</html> 

HOw do I get the error messages to disappear (and preferably reset) when I close the modal 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-24T11:43:00+00:00Added an answer on May 24, 2026 at 11:43 am

    Change your trigger variable to this:

    var triggers = $(".modalInput").overlay({
    
            // some mask tweaks suitable for modal dialogs
            mask: {
                color: '#ebecff',
                loadSpeed: 200,
                opacity: 0.9
            },
    
            closeOnClick: false,
            onClose: function () {
                $('.error').hide();
            }
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a text area in my form which accepts all possible characters from
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to loop through a bunch of documents I have to put
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into

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.