473,396 Members | 1,754 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Closing a Window

Maybe I should have been more precise.

Page1.asp does a window.open in client side vbscript. It then does a post to page2.asp
Page2.asp may take 5 minutes to process and when it is complete I want to close the window
that was opened by Page1. The idea is to put a message on the screen so the user doesn't close
Page2.asp while it is still processing. Any ideas?

Nov 17 '05 #1
3 1561
What you could do is use a bit of javascript magic with the assistance of
the XMLHTTP object. You can write out a page that tells the user not to
close the window (which is a suboptimal design, I have to tell you - any
design that requires you to trust a user not to do something stupid should
be reconsidered) and then run a javascript that issues an asynchronous post
to the 5-minute asp script on your server. You can then subscribe a function
call to the onLoad event for the XMLHTTP object so that, once your script
has run and your page returns results, you can react by closing the window,
writing a different message to the user, or whatever you want to do.

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows XP
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Mike H" <mh****@buehner-fry.com> wrote in message
news:E4**********************************@microsof t.com...
Maybe I should have been more precise.

Page1.asp does a window.open in client side vbscript. It then does a post to page2.asp Page2.asp may take 5 minutes to process and when it is complete I want to close the window that was opened by Page1. The idea is to put a message on the screen so the user doesn't close Page2.asp while it is still processing. Any ideas?

Nov 17 '05 #2
Hi,

Firstly I want to thank Chris for his great help in this issue. Please
refer to his response carefully.

In addition, based on my research and experience, Calling Remote Scripting
Methods Asynchronously should be another option for your reference. Please
refer to the following URL for the detailed information.

Calling Remote Scripting Methods Asynchronously
http://msdn.microsoft.com/library/de...us/rmscpt/Html
/rmscpt6.asp

I hope it helps.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 17 '05 #3
Hi,

Firstly I want to thank Chris for his great help in this issue. Please
refer to his response carefully.

In addition, based on my research and experience, Calling Remote Scripting
Methods Asynchronously should be another option for your reference. Please
refer to the following URL for the detailed information.

Calling Remote Scripting Methods Asynchronously
http://msdn.microsoft.com/library/de...us/rmscpt/Html
/rmscpt6.asp

I hope it helps.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 17 '05 #4

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

Similar topics

2
by: Derek | last post by:
Hello: I want to capture the event when a browser is closing, to give to the user the posibility of close or no this browser. When the browser is closing, this show a confirm window with two...
10
by: Tom Szabo | last post by:
Is there an event when that triggers when the window is closing.... I am talking about when the user clicks on the cross on the right top corner of the window!!!
5
by: Ron L | last post by:
I have an MDI application with a number of child windows. In each child window I am catching the Closing event and having the child window decide if it should set cancel to true. The intent here...
2
by: Ron L | last post by:
I have an MDI application which opens a number of child windows, each of which could have data in a state that needs to be saved. Each child window catches its Closing event and cancels it if the...
4
by: bbass | last post by:
thanks to all that replyied to my previous post with the following code in question: <a href="merc.htm" target="_new_merc" onfocusout=window.close class="left_link"> i understand that the...
1
by: Chris Bruce | last post by:
In my application I need a way to distiguish between the following events: 1. When a user closes an MDI child window. 2. When the user closes the MDI parent window which subsequently closes the...
3
by: Saradhi | last post by:
Hi, I wanted to stop the VS.NET Window from closing inside my C# AddIn. I Know that OnBeginShutdown() funciton will be called whenever the user tries to close the VS.NET window. I want to...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
2
by: Tom | last post by:
How is the best way to avoid validation when closing a window? For instance, I have a Windows Forms window which has a validation event for a text box. However, if one enters invalid data in then...
2
by: javanet | last post by:
Hi all, 1) i opened a parent window. 2) then i opend a child window thruogh this parent window. Now i want to close child window before closing the parend window means my clients can not be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.