CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 How to close parent window and open new window

Print topic Send  topic

Author Message
tulnetdotcom

Posts: 26
Posted: 11/25/2004, 1:24 AM

I have one application in which I want to open insert form window in full screen mode and after inserting a record in database it should close and open a new window.

Please help me.


Thanks :-)
View profile  Send private message
kevind

Posts: 251
Posted: 11/26/2004, 2:34 AM

I did this up while developing a side toolbar. I would have the form in CCS call another page after insert in the RETURN PAGE property and in that page put this code in the onload event for the client. You can adjust it and remove pieces you don't want. Just copy the text below into the notepad and save the file with '.htm' extension.

The last 2 lines were the key to it working - I think one declares the current window to be 'in control' and the next to close itself.

Another approach to go from full-screen to somewhere else might simply be to resize the window?

Kevin


<html>
<title>MySideBar</title>
<body bgcolor="#FFFFFF" onLoad="OpenSideBar()">
<script language="JavaScript">
<!--
// This function moves the window when the page is loaded
// to the top left corner and resizes it then opens a side window panel
// ideally I want it to close the calling browser window, even if asked to confirm
//
function OpenSideBar()
{
self.moveTo(0,0)
self.resizeTo(150,965)
window.open("http://www.google.ca","MySideBar","width=150,height=965,left=0,top=0,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,fullscreen=no")
window.opener = window;
window.close();
}
-->
</script>
</body>
</html>




_________________
thanks
Kevin

======================
CCS 3.2.x / ASP / MS Access /mySQL / PHP / jQuery / jQuery UI / jQuery Mobile
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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