473,320 Members | 1,933 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,320 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 1555
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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.