Unload Events not loading programs
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Bibhu_Kalyan
Posted On:   Friday, August 29, 2003 03:32 AM

Hi All, I have a head crashing problem, I want to clear few things in database when some user close the window or clicks on log off . Loggoff also close the window. Application is accessed on Internet explorer 5.5 or higher. So I call a function declared like following in my body 'onUnload' event. This works properly in my local server where this does not work , when I host the same program in remote server. In remote server it never sends the request to server , once browser is closed. I also tried with onBeforeUnload , form.submit instead of top.location but nothing works once browser is closed. The program is correct and it works fine if i call from a link. So how to call this somehow when   More>>

Hi All,
I have a head crashing problem,
I want to clear few things in database when some user close the window or clicks on log off . Loggoff also close the window. Application is accessed on Internet explorer 5.5 or higher.
So I call a function declared like following in my body 'onUnload' event. This works properly in my local server where this does not work , when I host the same program in remote server. In remote server it never sends the request to server , once browser is closed.

I also tried with onBeforeUnload ,
form.submit instead of top.location but nothing works once browser is closed.

The program is correct and it works fine if i call from a link.

So how to call this somehow when I close browser ? I think server does not process as it finds out client is no more live.

Any clue will be really helpful.

Regards and Thanks a lot.
Bibhu

			
function unloadEventHandle()
{
if ((window.event.clientY < 0) && (window.event.clientX < 0))
{
top.location = "/credit/oc4j/UnlockApplication.do?UserId=15666" ; // this send request to server

self.opener = null;
self.close();
self.parent.opener = null;
top.close();
}
}





   <<Less

Re: Unload Events not loading programs

Posted By:   Nitesh_Naveen  
Posted On:   Monday, September 1, 2003 07:32 AM

I don't know how it even works on your local server. when you change the top.location you are moving on to another page and hence losing the control from the current page. So none of the following statements will work. probably you should open a new (small) window with this url, and in that page, once the processes are over, close the window. That may work.
About | Sitemap | Contact