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

The Archive Base Latest Questions

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

Lets say I made a big form. Let one element of the form be

  • 0

Lets say I made a big form.
Let one element of the form be like this :

<form>
...

<tr>
<td><div id="username"><input name="username" id="username" type="text"/></div></td>
</tr>

...
</form>

Now I placed a div at the bottom something like this:

<div id="submiter">Submit</div>

Now I have this js:

$("#submiter").click(function() {
    $.post("submiter.php",
        $("#formmain").serialize(),
        function(data) {
        $.each(data,function(){
          id=thisid;
          error=this.error;
          //want some code here to over lay div with the id got with this.id
        }) },'json')
});

Now the php returns json in this format

[{id:formelementid,error:The error}]

Question:
How to overlay completely a div with class errors with the errors in it for simplicity let the div be #username?
A demo would be very nice

  • 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:41:57+00:00Added an answer on May 24, 2026 at 11:41 am

    This is a CSS question:

    .errors {
        position:absolute;
        z-index:2; /* Or higher than parent div */
        width:100%;
        height:100%;
        background-color:#FFF; /* Whatever */
    }
    

    If you want to append this div with JQuery, use append[docs]:

    $('<div class="errors"/>').appendTo('#my_form');
    

    In your example, it would work like so:

    $("#submiter").click(function() {
        $.post("submiter.php",
            $("#formmain").serialize(),
            function(data) {
                var errors = '';
                $.each(data,function(){
                    id=thisid;
                    error=this.error;
                    errors += error + '<br />'; 
                });
                $('<div class="errors"/>').appendTo('#my_form').html(errors); 
            },'json')
    });
    

    To make the overlay go away when the user wants it to, simply apply a click handler:

    $('.errors').live('click',function(){
        $(this).remove();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

lets say i've a form and in this form i would like to duplicate
Let's say I have this blob of code that's made to be one long-running
Lets Say i have a table like this WEB_LIST_TABLE KEY Value ---------------------------------------- 134 google.com
Lets say you have a FooManager made to manage multiple objects of type Foo
I have had really big problems understand the char* lately. Let's say I made
Lets say i have markup such as this <div style='display:none'> <!--Flash Object--> </div> Would
Lets say I have something like this in my database (abstract) MyTable { Long
Lets say I have three divs in my HTML <div> <h2>This is div 1</h2>
I made pagination with PHP and jQuery for topic+entry project Lets say a topic
how can i made some nice slideshow for the index.html page, with lets say

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.