View Full Version : onunload - suddenly called problem

06-01-2005, 05:26 AM
I have implemented some code in onunload javascript event.

1. Sometimes while in the middle of loading the page, the onunload javascript event is invoked. My page is very big. Is there any chance, this may be the cause?
2. In another scenario, on a page where processing takes more time, the onunload event is called suddenly. This is happening sometimes only.

I am confused why onunload will be called all of a sudden in the middle of the processing.

Any suggestions/inputs are helpful.

Thanx in advance.

06-01-2005, 05:29 AM
It shouldn't be called, maybe you have an onload somewhere in your script, can you show us your code please, or give us a link to the site in question?

06-01-2005, 05:42 AM
Thanks for the immediate reply.

It's a simple onunload in the body tag in a jsp, as mentioned below:

<body onunload="logout();" bgcolor="cyan">
Here is the content which is around 300 lines, with 70% static content and 30% dynamic content (from session and from database).

Did you face any kind of problem with onunload event, anytime.

Thanx in advance.