472,779 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Self.close not working IE6.0.28...

I have a webpage where the user enters parameters for a report. This
page then post to a 2nd page. In this second page is the code to
create the report. The output of the page when it is complete should
open the report(in excel or snapshot) and then close the page.
From the prompt page the post looks like this:

<FORM NAME='frmReportpr' method=POST
action=\aspobjects\ReportPreview.asp target='_blank'>
the ReportPreview page looks like this:
<%
'DECLARTION OF VARIABLES
......

Set oReport = CreateObject("GPReport.clsReport")
'SUBMITT THE REQUEST TO THE REPORT QUEUE SERVER
If ( oReport.RequestReport(Cstr(strReportQueueServer),
CStr(strReportType), Cstr(strWebGroupName), CStr(strInputFileName),
CStr(strReportName), CStr(strSQL), Cstr(strAppName), 180)= True) then
'IF THE REQUEST WAS SUBMITTED SUCCESSFULLY, CHECK TO SEE WHAT TYPE OF
REPORT YOU ARE
filepath = replace(oReport.ReportName, "\", "\\")

%>
<script language="javascript">
window.setInterval(self.close, 2000);
var shell=new ActiveXObject("WScript.Shell");
cmdpath = "\"<%= filepath %>\" "
//alert(cmdpath)
shell.Run(cmdpath,1);
//alert('Closing the Window');
window.setInterval(self.close, 2000);
</script>
<%
Else
The report runs fine, and opens in snapshot or excel. However I am
left with a blank page in a new instance of the browser. On some
computers the new browsers closes????????

Any ideas?????

Thanks

Jul 23 '05 #1
1 3532
Lee
Steven said:

window.setInterval(self.close, 2000);


If the page that is trying to close was opened by script, rather than by a link,
then you should be able to close it with:

setTimeout("self.close()", 2000);

setInterval() would also work, but is really intended for recurring events.

Jul 23 '05 #2

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

Similar topics

2
by: Marc | last post by:
Hi all, I was using Tkinter.IntVar() to store values from a large list of parts that I pulled from a list. This is the code to initialize the instances: def initVariables(self): self.e =...
14
by: bruce stockwell | last post by:
Using 'self' in classes seems pretty straight forward. My curiosity is why I have to use it. Shouldn't it be implied? If I create an instance of 'human' called 'bruce' and call the method 'blink'...
2
by: Clive Moore | last post by:
I am using the following code to close a parent window. setTimeout('self.close()',1000); Is it posible to remove the confirm dialog? Thanks Clive --
4
by: Raymond Wilk | last post by:
I used javascript to open a new window, then used the following to close the new window on the next click: <body onBlur="self.close()" onClick="self.close()" bgcolor="#FFFFFF"> On the new window...
2
by: Kathy Burke | last post by:
Hi, could have sworn I used this before and don't understand why this isn't working? I have a button with onclick event: do some database updates, etc. then, open a new window (a...
4
by: stevong | last post by:
It works on Konquerer though. I remember it works on IE too. I've tried window.close() too. Doesn't work on Firefox also. I've also tried to create a function. It doesnt work on Firefox also....
1
by: oliver gargour | last post by:
Hello, I am using the following code in a popup. <html> <head> <title></title> </head> <body onLoad="this.focus();" onblur="self.close"> <form action="" method="get">
1
by: liu | last post by:
I have some thumbnails and once clicked it creates a new window. I don't want extra windows everywhere so I'd like it to auto-close when it's in the background. I've found <body...
1
by: michal.podlewski | last post by:
Hi All, I have a problem with a simple (as I thought till now) thing: I want to make a link in a child-window which would change site in the parent-window and along with closing child window. The...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.