which event is fired when a browser is closed. i want to call asp page which deleet some files on the server. i tired using onunload event but it aslo get fired when a page is refreshed. the thing should work in netsacpe also.
I would like to capture window close event, i.e. when user clicks "X" button of the browser, I would like to close all open dataabse connections.
Also, I would like this to apply when a user tries to close browser using File > Exit or when the user tries to type another website URL in the browser.
I wrote an ASP page to export data from the database to an excel spreadsheet file. The problem is, after the user saved the file to his/her hard drive, the export browser window still remains. How do I close the export window after users saved the file?
I have a wierd question that may involve a little explaining. I have a web app that uses SOAP calls to manipulate the files in a source safe database, and i need to program for the possibility that someone will close the browser before they check a file back into the source safe.
i need to execute a "ReleaseFile" soap call so that the file will be not be checked out, to remove the ability for other users to edit the file So far i have tried putting my final soap call in my Global.asa and then set the timeout variable to 1, the global is executing, but the SOAP doesn't always execute, and the session is left hanging, or the file isn't checked.
I wrote global.asa file but I couldn't get what I expect.After user logs on to the system,if he/she directly closes the explorer,the time he/she logs out must be written to the database.I have logout.asp file which do this when the user click on the LOGOUT button,but if the user doesn't click it just closes the explorer what handles it??The following global.asa tries to do that but I think there is something wrong.If you examine it I would be very happy thanks...
GLOBAL.ASA
<script language=vbscript runat=server> Sub Application_OnEnd() session.abandon() End Sub Session.Timeout=1 Sub Application_OnStart() Application("CurrentUser")=0 Application("TotalUser")=0 End Sub Sub Session_OnEnd() Application("CurrentUser")=Application("CurrentUser")-1 Application("TotalUser")=Application("TotalUser")-1 Set con = Server.CreateObject("ADODB.Connection") con.Open "DSN=Address" SQL="UPDATE tblLog SET fldTimeOut= "' & Time() & "' WHERE fldUserName= "' & Session("Admin") & "'" con.execute(SQL) session.abandon() con.close End Sub Sub Session_OnStart() Application("CurrentUser")=Application("CurrentUser")+1 Application("TotalUser")=Application("TotalUser")+1 End Sub </script>
I've been trying to save some user settings when the browser closes, but with little success. What I want to do is count a users' resource usage, and write it to a database when the user closes the browser. I tried to use the 'Session_End' event handler in global.asax, but that doesn't seem to work.
I use Request.ClientCertificate to read user cert from Estonian National ID Card for authenticating users. All works fine, i can read cert and personal id code, authent. user aso.
But problem is when user logs out and the browser info stays open, even when user removes id-card from reader and clicks on "Login" link, user will be authenticated because cert. is in cache? Code:
Iam trying to capture windows closing event (i.e) when the user clicks on the "X" button i want to capture that event and want to update some values in the database.I tried two methods but iam getting problems with the two methods. Code:
I currently have an event calendar that works fine so far.One thing i would like to improve is that when there is an event on that date,i wish it to be highlighted with a different color. Code:
i have quotation_start.asp which was set to be a small window (height=250, width=500). there is a YES button and some data on this page. when user clicks YES, data will be saved into database, quotation_start.asp will be closed automatically and a new page, quotation_admin.asp will appear in the main window at rightFrame. everything is ok except the quotation_start.asp never close. it remains there. here is the code:
i want to know a way to end the session as the user closes the window. As the user closes the reg_conf.asp page, i want the session of this user to end as well. how to do? how to detect the closing of the browser? ive used global.asa.
I am trying to set a cut off limit date on my page. For example if the class limit is 40, it should automatically close the registrations. How would I code for that ?
This code was written by someone elase. But I have to add this functionality of setting limits. The code is: Code:
Host Environment: IIS in window 2003 server, three web servers, one load balance, ASP (not ASP.net) code set.There is part A codes in one asp page (page A) to open a new window (Window B). The new window like a clock non-stop running. There is part B codes in the page A need to close window B.
There is no problem if the there is only one web server. It works. When there is a load balance and more than one web server, then the window B can not be closed.
Is it possible to move to all the open RS and connections? I open different recordsets on my page and in the end I need to close them and close connection. Problem is I need a function to do that to have it on every page.
Is it possible to travel through all open recordsets like it is possible to travel through all the querystrings and form data?
i have a exit button...where when i click on it..it should show msg box..asking whether to close the form or not?..if yes it should colse the form and show the main form...if no..it should redirect to the same form..hw to do this using asp.
I have developed an ASp files i have used lot of objects in it like recordset and connection objects, but some of the objects is not being closed.so is it possbile to write a code which automatically closes all the objects opened without mentioning the name given to the object.
I have a system of pages set up on an intranet that uses a top frame and left frame for much of the navigation. But I would like to allow the people viewing the pages to close and reopen the frameset thus allowing more room to view the content. Is there a way that I can make a button either close or just resize the nav frames without losing the content page...
I think that a resize option would be the best that way I can just put a link on the frame and resize it to where only the link is viewable.
I want to close the window without the warning "internet explorer is trying to close..." being displayed. I want to do this with vbscript. I found out that in javascript you can do it by including window.opener='x' followed by the window.close statement.My code is: Code:
Response.Write "<script type=""text/vbscript"">" Response.Write "MsgBox ""Hi. see you again""" Response.Write vbcrlf Response.Write "window.close" Response.Write "</script>"
I use window object with close method to close a web page, this web page is designed by active server page and VBscript. the code is as follows: window.close()
however, an alart messege comes from IE. It's details: The Web page you are viewing is trying to close the windows. Do you want to close this windows? I want to directly close the window without any alart messege. In VBA, we can add a declare Application.displayalart =false. How to do this in html or VBA?
I have a site which has extensive database activity. What I do is for each procedure I open a connection to the database and close it as and when I leave the procedure. However, in long run I find that some connection to the database is not properly closed causing the site to hang. This has become a big headache for me.
Trying to find what is going wrong I logged opening /closing of connections to the database and found that at some points the connections are not closed resulting in large no. of active connections to the database.
But if I go through the script I cannot really understand why that connection was not closed since the script ensure that the connection is closed before exiting the procedure.
Is there any way where I can check the database may be during night time and close all existing connections to the database. I repeat all my connections to the database are done at the procedure level.
Which is the most efficient way to hit the database: 1) to open/close the connection for each call to the database on a page (we have Subs that do this); 2) or use the same connection and close it at the end? My feeling is that 2 is better, but just wanted to confirm with the experts.
Im writting an asp app that tracks the users scores and info (its a training app) to a access database, ive disabled the ie toolbars and everthing so the user must use my nav buttons so i can track what pages they have been to. My problem is if the user closes IE with the close button [X], is there a way i can redirect them to my close database and save results page, i cant use the unload event as this is trggered every time the use goes to the next page.