Currently I have onBeforeUnload with a certain function being activated within my page. On one of my pages I need to apply another function onto onBeforeUnload, so that both functions will upload. I've been using:
-
var objBody = document.body;
-
var oldEventHandler = objBody.onBeforeUnload
-
objBody.onBeforeUnload = function() { oldEventHandler(); test(); }
-
//test is a function elsewhere.
-
The main problem I am facing is I can't seem to be able to get to the body's true onBeforeUnload. When i bring up the body within Visual Studio and I look at the array I cannot find my previous function applied to onBeforeUnload anywhere.
Any suggestions?
Thank you,
Holy