closing a popup form

Posted on 2011-03-04
Last Modified: 2012-05-11
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
Question by:vbnetcoder
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 16

Expert Comment

by:Kalpesh Chhatrala
ID: 35041805
Check this there is java script for form closing

Author Comment

ID: 35041812
can't i do it in
LVL 20

Expert Comment

ID: 35042634
OpenPopup would be javascript right?
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.


Author Comment

ID: 35043340
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

Accepted Solution

Anurag Agarwal earned 500 total points
ID: 35044048
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 ="",
      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

Author Closing Comment

ID: 35087673

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL ( and MongoDB (…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question