Solved

closing a popup form

Posted on 2011-03-04
6
216 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
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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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 (http://www.ecb.europa.eu/stats/exch…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

776 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