• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

closing a popup form

I have a small popup form that opens when a user clicks on a button . They underlying form stays open.

What would the code be to close the form? Currently, i have to click on the X
1 Solution
Kalpesh ChhatralaSoftware ConsultantCommented:
Check this there is java script for form closing

vbnetcoderAuthor Commented:
can't i do it in asp.net?
Obadiah ChristopherCommented:
OpenPopup would be javascript right?
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

vbnetcoderAuthor Commented:
I am not sure what the technical term for what i have is ..... basiicly, i need the form to close and the from load event of the underlying for to run
Anurag AgarwalCommented:
here is the client script tht u can use on the parent page from where the pop up window is open
and you can close the same from paren window.

   <title>JavaScript Window Close Example </title>
<script type="text/javascript">
   function popuponclick()
      my_window = window.open("",
      my_window.document.write('<h1>The Popup Window</h1>');
   function closepopup()
      if(false == my_window.closed)
         my_window.close ();
         alert('Window already closed!');
      <a href="javascript: popuponclick()">Open Popup Window</a>
      <a href="javascript: closepopup()">Close the Popup Window</a>

Open in new window

here is the link for code help

and pls chk the example thru this code
vbnetcoderAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now