CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Auto Close Popupwindow

Print topic Send  topic

Author Message
duplo1

Posts: 67
Posted: 11/23/2007, 6:52 AM

I am using the Popup Window Plugin for CCS.

I am using a popup window to add quantities (Record). Can someone show me how to automatically close the popup window once the quantity has been added.

I am using ASP.

Please help.

Christoph
View profile  Send private message
andrewi

Posts: 162
Posted: 11/25/2007, 11:38 PM

Here's a suggestion:

Create a new page called, say CloseWindow.

In the Client OnLoad event, put this code:
	  
   opener.focus();  
   // opener.location.reload();  
   window.close();  

Set the ReturnPage property of the Record component on your popup page to the new CloseWindow page.

Thus, after your popup record saves, codecharge calls the CloseWindow page, and the javascript there closes the popup window. It also sets the focus on the page that called the popup to make sure.

uncomment the ...reload line if you want to refresh the original form once the popup record has been saved - useful if the page that called the popup is a grid.
View profile  Send private message
Edd


Posts: 547
Posted: 11/29/2007, 12:02 AM

In the AfterInsert event and you have tested for no errors add the fiollowing:

Quote :
response.write "<script>window.opener.location.reload();window.close();</script>"

In the long run you need to investigate and understand Javascript with web pages and the ability to even pass arguments back to tke openning page by the aforementioned reference.


Cheers
Edd
_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.