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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:51:52+00:00 2026-06-03T22:51:52+00:00

i have a css popup div that when it loads through the onClick it

  • 0

i have a css popup div that when it loads through the onClick it also brings up a blanket of transparency kind of like how Facebook does when you look at photos

How do i get that popup div to close when i click on the blanket?

Heres the code

‘

<center><div id="blanket" style="display:none;">
</div>

<table width="1000" border="0">    
  <tr>

 <td>  
<div id="mainAdminCP">

<div class="editRecipe" >
<a href="#" onclick="popup('popUpAdminEditRecipe');return false;"><h2>Edit Recipe</h2></a> 
</div>
<div id="popUpAdminEditRecipe" style="display:none;" align="center"> 
<br />
<br />
<form id="editRecipe">
<fieldset id="inputs">
    <input id="username" type="text" placeholder="Please insert the name of the recipe" autofocus required>   
    <br />
    <br />
    <input id="add" type="text" placeholder="Recipe Name" required>
    <input id="add" type="text" placeholder="Recipe Ingredients" required>
    <input id="add" type="text" placeholder="Recipe Instructions" required>
    <input id="add" type="text" placeholder="Recipe Image" required>
</fieldset>
<fieldset id="actions">
    <input type="submit" id="submit" value="Save Changes">
    <input type="submit" id="submit" onClick="popup('popUpAdminEditRecipe')" value="Close">
</fieldset>
</form>
</div>   

<div class="editCoins"> 
<a href="#" onclick="popup('popUpAdminEditCoins');return false;"><h2>Edit Coins</h2></a> 
</div>
<div id="popUpAdminEditCoins" style="display:none;" align="center"> 
<br />
<br />
<form id="login">
<fieldset id="inputs">
    <input id="username" type="text" placeholder="Please insert the Username of the User" autofocus required>   
    <input id="add" type="text" placeholder="Add Coins" required>
    <input id="add" type="text" placeholder="Subtract Coins" required>
</fieldset>
<fieldset id="actions">
    <input type="submit" id="submit" value="Submit">
    <input type="submit" id="submit" onClick="popup('popUpAdminEditCoins')" value="Close">
</fieldset>


‘

And heres the link to the page itself to get a clear example of what im looking for.

http://teknologenie.com/fruitforest/admincp.php

Ive tried placing the
<a href="#" onClick="popup('popUpAdminEditUser')" > </a>
Within the blanket div, and nothing. Just kind of screws everything up.

Edit:
Also if you visit the link, and click the text, the whole div doesnt get directly in the middle of the screen and i need it to be. Any solutions?

  • 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-06-03T22:51:54+00:00Added an answer on June 3, 2026 at 10:51 pm

    Instead of putting an link inside the blanket div, pup an onclick function on the blanket div itself:

    <div id="blanket" onclick="closePopup()" style="height: 681px; display: block;"></div>
    

    The function closePopup should then set display none to the popup and the blanket:

    function closePopup() { 
        document.getElementById('blanket').style.display = 'none';               
        document.getElementById('popUpAdminEditCoins').style.display = 'none';
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple CSS help popup that's been working well for me in
I have a popup div that I need to load a bunch of different
I currently have a div that acts like a gallery so to speak. div
Hey i have this div that shows as a popup: <div class=popup> </div> Then
I have a CSS image sprite and this renderes perfect in FF, also IE.
I have some CSS that doesn't behave correctly with IE8. It works fine with
I have applied CSS style to JavaFX components and it looks like everything is
I would like to hover an image and popup a div, without plugins. just
I have a button with remote=>true that calls a popup (a jquery popup, not
I have this HTML: <div class=info> Some Text Boom A <a onclick=menu('id1');>Link</a> | More

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.