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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:04:00+00:00 2026-05-13T08:04:00+00:00

How to make a simple modal popup for the following code.And on click on

  • 0

How to make a simple modal popup for the following code.And on click on the background the modal popup should not disappear.

<html>
<input type="textarea"></input>
</html>
  • 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-13T08:04:00+00:00Added an answer on May 13, 2026 at 8:04 am

    Here’s a plain-JavaScript example:

    var modal = document.getElementById('modal');
    var shade = document.getElementById('shade');
    document.getElementById('start').onclick = function() {
      modal.style.display = shade.style.display = 'block';
    };
    document.getElementById('close').onclick = function() {
      modal.style.display = shade.style.display = 'none';
    };
    
    // This code is a workaround for IE6's lack of support for the
    // position: fixed style.
    //
    if (!('maxHeight' in document.body.style)) {
      function modalsize() {
        var top = document.documentElement.scrollTop;
        var winsize = document.documentElement.offsetHeight;
        var docsize = document.documentElement.scrollHeight;
        shade.style.height = Math.max(winsize, docsize) + 'px';
        modal.style.top = top + Math.floor(winsize / 3) + 'px';
      };
      modal.style.position = shade.style.position = 'absolute';
      window.onscroll = window.onresize = modalsize;
      modalsize();
    }
    body {
      margin: 0;
    }
    
    #shade,
    #modal {
      display: none;
    }
    
    #shade {
      position: fixed;
      z-index: 100;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
    
    #modal {
      position: fixed;
      z-index: 101;
      top: 33%;
      left: 25%;
      width: 50%;
    }
    
    #shade {
      background: silver;
      opacity: 0.5;
      filter: alpha(opacity=50);
    }
    <div id="shade"></div>
    <div id="modal">
      <textarea rows="5" cols="25"></textarea>
      <button id="close">Close</button>
    </div>
    
    <p>
      <button id="start">Start</button>
    </p>

    There are various improvements you can make from there, such as iframe hacks to fix IE z-indexing, or encapsulating it in a reusable object, but that’s the basic way it’s done.

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

Sidebar

Related Questions

I'm trying to make simple website with content background combined from 3 images: top
<a href=#dialog name=modal>Simple Modal Window</a> <div id=boxes> this should be under modal <!-- #customize
Not sure what I'm doing wrong here. Just trying to make it a modal
ASP.NET MVC 2.0: Simple Model Binding not working/binding as it should i have a
I have a simple jQuery dialog box that has an html input inside it.
Basically I want to make simple toggle program (that will be mapped to some
Trying to make simple minesweeper game in python, but have one problem. I have
I need to make simple CRUD web app (i'll get paid for it), but
I am trying to make simple notepad application for learning android development. So, to
I'm trying to make simple script using jquery $post function to pass data to

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.