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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:09:25+00:00 2026-06-16T05:09:25+00:00

I created a popup within another popup. Here is my code, <html> <head> <title>Popup</title>

  • 0

I created a popup within another popup. Here is my code,

<html>
<head>
    <title>Popup</title>
    <script type="text/javascript" src="jquery-1.6.1.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function(){
            //open popup
            $("#pop").click(function(){
              $("#background").css({"opacity" : "0.7"}).fadeIn("slow");    
              $("#overlay_form").fadeIn(1000);                              
              positionPopup();                  
            });
            $("#plus").click(function(){
              $("#background").css({"opacity" : "0.7"}).fadeIn("slow"); 
      $("#overlay_form").css({"opacity" : "0.7"}).fadeIn("slow");      
              $("#inner_form").fadeIn(1000);                              
              positionPopup();                  
            });
            //close popup
            $("#close").click(function(){
                $("#overlay_form").fadeOut(500);
                $("#background").fadeOut("slow");    
        document.getElementById("loc").value="";
        document.getElementById("uname").value="";
            });
            $("#innerclose").click(function(){
                $("#inner_form").fadeOut(500);  
        $("#overlay_form").fadeIn(500);     
        var newloc=document.getElementById("nloc").value;
        document.getElementById("loc").value=newloc;
        document.getElementById("nloc").value="";   
            });
        });
        //position the popup at the center of the page
        function positionPopup(){
              if(!$("#overlay_form").is(':visible')){
                return;
              } 
              $("#overlay_form").css({
                  left: ($(window).width() - $('#overlay_form').width()) / 2,
                  top: ($(window).width() - $('#overlay_form').width()) / 7,
                  position:'absolute'
              });
      $("#inner_form").css({
                  left: ($(window).width() - $('#inner_form').width()) / 2,
                  top: ($(window).width() - $('#inner_form').width()) / 5,
                  position:'absolute'
              });           
        }
        //maintain the popup at center of the page when browser resized
        $(window).bind('resize',positionPopup);
    </script>
    <style>
        #background{
            display: none;
            position: absolute;
            height: 100%;
            width: 100%;
            top: 0;
            left: 0;
            background: #000000;
            z-index: 1;
        }
        #overlay_form{
         position: absolute;
         border: 5px solid gray;
         padding: 10px;
         background: white;
         width: 270px;
         height: auto;  
             z-index:10;  
        }   
         #inner_form{
         position: absolute;
         border: 5px solid gray;
         padding: 10px;
         background: white;
         width: 250px;
         height: auto;  
             z-index:12;  
        }       
        #pop{
        display: block;
        border: 1px solid gray;
        width: 65px;
            height: auto;
        text-align: center;
        padding: 6px;
        border-radius: 5px;
        text-decoration: none;
        margin: 0 auto;                
        }
    </style>
</head>
<body> 
<div id="background"></div>
<a href="#" id="pop" >PopUp</a>
<br />
<form id="overlay_form" style="display:none">
    <label>Name</label><input type="text" name="uname" id="uname" /><br/><br/>
    <label>Location</label><input type="text" name="loc" id="loc" /><a href="#" id="plus" style="text-decoration:none;"> + </a><br/> <br/>
    <a href="#" id="close">Close</a>      
</form>  
<form id="inner_form" style="display:none"> 
 <label>New Location</label><input type="text" name="nloc" id="nloc" />
 <a href="#" id="innerclose">Close</a>  
</form> 
</body>

In this, I want to display the outer popup bright color after close the inner popup. If the outer popup is close, then the browser window will display brightly.

  • 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-16T05:09:26+00:00Added an answer on June 16, 2026 at 5:09 am

    Here is a fiddle. If I understood correctly the issue should be fixed.

    The only thing I’ve added is $("#overlay_form").css({"opacity" : "1"}).fadeIn("slow"); in the $("#innerclose")‘s click callback.

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

Sidebar

Related Questions

I created an Android App with Phonegap. Within my JavaScript code I do: window.location.href
I have created some JQuery that will expand a div 'popup' on hover and
I'm trying to create a popup for which I am using jQuery's CSS function.Here's
I created a UserControl to display a popup using a TextBlock within a Canvas
Hi I am trying to create a jquery popup bubble for items created in
I am trying to close the popup from within the popup that is created
I've created a modal popup using jQuery (while following this tutorial). It works well,
I am new to android development. I have created a popup window which is
I have created an Activity that will behave like a popup menu is actually
I have some jQuery code like this: // Called right away after someone clicks

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.