Solved

closing a popup form

Posted on 2011-03-04
6
219 Views
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
0
Comment
Question by:vbnetcoder
[X]
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
6 Comments
 
LVL 16

Expert Comment

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

http://forums.devx.com/showthread.php?t=148257
0
 

Author Comment

by:vbnetcoder
ID: 35041812
can't i do it in asp.net?
0
 
LVL 20

Expert Comment

by:informaniac
ID: 35042634
OpenPopup would be javascript right?
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

Author Comment

by:vbnetcoder
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
0
 
LVL 8

Accepted Solution

by:
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.

<html>
<head>
   <title>JavaScript Window Close Example </title>
</head>
<script type="text/javascript">
   function popuponclick()
   {
      my_window = window.open("",
       "mywindow","status=1,width=350,height=150");
 
      my_window.document.write('<h1>The Popup Window</h1>');
   }
 
   function closepopup()
   {
      if(false == my_window.closed)
      {
         my_window.close ();
      }
      else
      {
         alert('Window already closed!');
      }
   }
</script>
<body>
   <p>
      <a href="javascript: popuponclick()">Open Popup Window</a>
   </p>
 
   <p>
      <a href="javascript: closepopup()">Close the Popup Window</a>
   </p>
</body>
</html>

Open in new window


here is the link for code help

and pls chk the example thru this code
0
 

Author Closing Comment

by:vbnetcoder
ID: 35087673
ty
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

732 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