Results 1 to 3 of 3

Thread: onunload event problem

  1. #1
    Join Date
    Apr 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default onunload event problem

    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.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    If any part of your page causes a refresh. Refresh implies unload. Other than that, perhaps it is sloppy coding or, the event(s) designated onunload is/are being called for other reasons by other parts of the code. Hard to say without seeing it in action.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Apr 2005
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your reply.

    If the pages is very big like like 500k, is there any chance that browser will do a refresh or send the request again to the server?

    Is there any chance, that anything related to HTTP connection time out setting in the application server?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •