473,662 Members | 2,693 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

close window in server code?

I have a sub-window. When I click 'OK' I want to:
post back to to my server code, persist some data and close the sub-window.

I don't know how to close the subwindow in server code.

Marcel
Nov 18 '05 #1
3 1793
reply back with simple HTML
<html>
<body>
window.close();
</body>
</html>
If this is a window that was opened by window.open then it will be closed
without prompt.

George.

"Marcel Balcarek" <ma************ *@REM-OVEMEtoxicall.c om> wrote in message
news:Of******** ******@TK2MSFTN GP12.phx.gbl...
I have a sub-window. When I click 'OK' I want to:
post back to to my server code, persist some data and close the sub-window.
I don't know how to close the subwindow in server code.

Marcel

Nov 18 '05 #2
Thanks George,

But how do I send this code from the server using code behind?
Do I use the response object? a Write method?
I am unclear about how this code is to replace the normally generated client
HTML.

Marcel
"George Ter-Saakov" <no****@hotmail .com> wrote in message
news:uM******** ******@TK2MSFTN GP12.phx.gbl...
reply back with simple HTML
<html>
<body>
window.close();
</body>
</html>
If this is a window that was opened by window.open then it will be closed
without prompt.

George.

"Marcel Balcarek" <ma************ *@REM-OVEMEtoxicall.c om> wrote in message
news:Of******** ******@TK2MSFTN GP12.phx.gbl...
I have a sub-window. When I click 'OK' I want to:
post back to to my server code, persist some data and close the

sub-window.

I don't know how to close the subwindow in server code.

Marcel


Nov 18 '05 #3
Not sure that i understood your problem.
How do you output any HTML to the browser.
Exactly the same way you can output that particular HTML.

Use Response.Write or just put that HTML code into aspx file.

George.
"Marcel Balcarek" <ma************ *@REM-OVEMEtoxicall.c om> wrote in message
news:O5******** *****@TK2MSFTNG P10.phx.gbl...
Thanks George,

But how do I send this code from the server using code behind?
Do I use the response object? a Write method?
I am unclear about how this code is to replace the normally generated client HTML.

Marcel
"George Ter-Saakov" <no****@hotmail .com> wrote in message
news:uM******** ******@TK2MSFTN GP12.phx.gbl...
reply back with simple HTML
<html>
<body>
window.close();
</body>
</html>
If this is a window that was opened by window.open then it will be closed without prompt.

George.

"Marcel Balcarek" <ma************ *@REM-OVEMEtoxicall.c om> wrote in message news:Of******** ******@TK2MSFTN GP12.phx.gbl...
I have a sub-window. When I click 'OK' I want to:
post back to to my server code, persist some data and close the

sub-window.

I don't know how to close the subwindow in server code.

Marcel



Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6951
by: dibyendu_k | last post by:
Hi, There is a problem i cant solve regarding Internet Explorer 5.5. It is regarding the Print Dialog Box. From a webpage if I open a popup window (window.open()) containing buttons Print and Close. The functionality is that when i press the "print" button the Print dialog box is opened (window.print();) and when I click on the close button the popup window is closed (window.close();) But the problem occurs when 1. The Print button is...
4
34862
by: GrantS | last post by:
I am having a problem closing a popup window opened modally. When I try to close the window (when the user hits save button and the data has been processed), the Popup window opens as a full screen as a new window. The original window plus the Modally opened Pop remain in a separate window. What I want to do is close the popup and return to the original window with its view state maintained. The control use to fire the popup window...
7
2592
by: Drew Berkemeyer | last post by:
Hello, We have an application that we have written using ASP.NET. On one of our pages we open a popup window using javascript. The popup window has a save and a cancel button. Both of them are server-side controls and do a postback. While processing on the server we add javascript to the page load (i.e. onload=window.opener.focus(); window.close()). However, the window.close() command does not close the IE popup window. This happens...
14
2772
by: Paul | last post by:
Hi I have 2 functions in java script, one opens a second window-this works, the other is supposed to close this second window, does not seem to be working. Just wondering if anyone had any ideas. Here is the code, the functions are <script language="javascript"> function openwin(){ win_usr=window.open ("control_numinfo.aspx") } function closewin(){
4
1914
by: louise raisbeck | last post by:
I have this scenario (simplified) function addnewdata () { check for partial match already in db for information entered by user if (partialmatch succeeds) { open new window aspx page (using javascript) with a datagrid of these partial match records (by doing a sqlcommand using some query string values taken from opener data entered) *** }
5
3082
by: lindanr | last post by:
In ASP.NET 2005 I have an onblur="window.close()" javascript event in the <body> tag. When I click on the window's scrollbar, the window closes. The same code works fine in ASP.NET 2003. Any ideas?
11
4931
by: Dave | last post by:
For some reason, the below lines only work on select machines. All machines are running IE6. IE SP's and OS's vary. When it doesn't work, default.aspx (the page that this code is in) opens and closes. That's all you see. TSReminder.aspx doesn't even open. I'm not sure what's going on here. Response.Write("<script...
9
4652
by: Stan B | last post by:
I create a popup window by calling window.showModalDialog Popup window has Ok button with this code attached: === string Script = "<script language=JavaScript>" + "{" + "window.close();" + "}" + "</script>";
2
6751
by: kurt sune | last post by:
Hello, I have a weird problem, I hope someone can explain this for me. I have a webpage using masterpage. In it I create a popup window using this code: Dim js As String = "<script language=javascript>" js &= "var newWin = window.showModalDialog('InkommetVi.aspx" js &= "',null,"
0
8345
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8768
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7368
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5655
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4181
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4348
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2763
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.