Export (0) Print
Expand All

Sys.Application.unload Event

.NET Framework 3.5

Raised before all objects in the client application are disposed, typically when the DOM window.unload event is raised.

Sys.Application.add_unload(handler);
Sys.Application.remove_unload(handler);

handler

The delegate function to bind or unbind from the unload event.

Attach delegate functions to the unload event to complete any tasks that must be performed before the client application is unloaded. This event is raised before all objects in the client application are disposed, typically when the DOM window.unload event is raised. The add_unload accessor binds a delegate function to the unload event, and the remove_unload accessor unbinds it.

The following example how to create a handler for the unload event that opens a new browser window for the user to complete a survey.

// Attach a handler to the unLoad event.
Sys.Application.add_unload(applicationUnloadHandler);

function applicationUnloadHandler() {
    // Redirect user to a survey form.
    window.open("SurveyForm.aspx");
}

Community Additions

ADD
Show:
© 2014 Microsoft