Window.close overriding in java script
-
I want to override window.close native function to perform my own operation before window close. Window.close overriding is not working in IE-10 and IE-9 in Standard mode without compatibility mode. Window.close overriding working in compatibilty mode. Please help. :)
Thanks Tahir.
-
I want to override window.close native function to perform my own operation before window close. Window.close overriding is not working in IE-10 and IE-9 in Standard mode without compatibility mode. Window.close overriding working in compatibilty mode. Please help. :)
Thanks Tahir.
You might want to try jQuery's unload:
$(window).unload(function()
{
//...
});Cheers, Edo
It is a paradox that paradoxes would actually exist in reality. That means of course that they don't exist. However, they do!
∫(Edo)dx = Tzumer ∑k(this.Kid)k = this.♥
-
You might want to try jQuery's unload:
$(window).unload(function()
{
//...
});Cheers, Edo
It is a paradox that paradoxes would actually exist in reality. That means of course that they don't exist. However, they do!
∫(Edo)dx = Tzumer ∑k(this.Kid)k = this.♥
Thanks Edo For your rply, But i have used window.close in several places in my product so need to override window.close.
-
Thanks Edo For your rply, But i have used window.close in several places in my product so need to override window.close.
-
You are most welcome, did it work?
It is a paradox that paradoxes would actually exist in reality. That means of course that they don't exist. However, they do!
∫(Edo)dx = Tzumer ∑k(this.Kid)k = this.♥
It works but i want to close the window by overriding window.close. Please suggest anything else. Thanks :-)
-
It works but i want to close the window by overriding window.close. Please suggest anything else. Thanks :-)
Only one way function close is a pre-defined property of window object. Please use event bubbling of close() and window. Insert a new funktion that recives this event what you want (event handler). Prototyping of a function ... try it. events of window (IE) Event Description onactivate Fires when the object is set as the active element. onafterprint Fires on the object immediately after its associated document prints or previews for printing. onbeforedeactivate Fires immediately before the activeElement is changed from the current object to another object in the parent document. onbeforeprint Fires on the object before its associated document prints or previews for printing. onbeforeunload Fires prior to a page being unloaded. onblur Fires when the object loses the input focus. oncontrolselect Fires when the user is about to make a control selection of the object. ondeactivate Fires when the activeElement is changed from the current object to another object in the parent document. onerror Fires when an error occurs during object loading. onfocus Fires when the object receives focus. onhelp Fires when the user presses the F1 key while the browser is the active window. onload Fires immediately after the browser loads the object. onmove Fires when the object moves. onmoveend Fires when the object stops moving. onmovestart Fires when the object starts to move. onresize Fires when the size of the object is about to change. onresizeend Fires when the user finishes changing the dimensions of the object in a control selection. onresizestart Fires when the user begins to change the dimensions of the object in a control selection. onscroll Fires when the user repositions the scroll box in the scroll bar on the object. onunload Fires immediately before the object is unloaded. methods of window (IE) Method Description alert Displays a dialog box containing an application-defined message. attachEvent Binds the specified function to an event, so that the function gets called whenever the event fires on the object. blur Causes the element to lose focus and fires the onblur event. clearInterval Cancels the interval previously started using the setInterval method. clearTimeout Cancels a time-out that was set with the setTimeout method. close Closes the current browser window or HTML Application (HTA). confirm Displays a confirmation dialog box that contains an optional message as well as OK and Cancel buttons. createPopup Creates a popup wind
-
Only one way function close is a pre-defined property of window object. Please use event bubbling of close() and window. Insert a new funktion that recives this event what you want (event handler). Prototyping of a function ... try it. events of window (IE) Event Description onactivate Fires when the object is set as the active element. onafterprint Fires on the object immediately after its associated document prints or previews for printing. onbeforedeactivate Fires immediately before the activeElement is changed from the current object to another object in the parent document. onbeforeprint Fires on the object before its associated document prints or previews for printing. onbeforeunload Fires prior to a page being unloaded. onblur Fires when the object loses the input focus. oncontrolselect Fires when the user is about to make a control selection of the object. ondeactivate Fires when the activeElement is changed from the current object to another object in the parent document. onerror Fires when an error occurs during object loading. onfocus Fires when the object receives focus. onhelp Fires when the user presses the F1 key while the browser is the active window. onload Fires immediately after the browser loads the object. onmove Fires when the object moves. onmoveend Fires when the object stops moving. onmovestart Fires when the object starts to move. onresize Fires when the size of the object is about to change. onresizeend Fires when the user finishes changing the dimensions of the object in a control selection. onresizestart Fires when the user begins to change the dimensions of the object in a control selection. onscroll Fires when the user repositions the scroll box in the scroll bar on the object. onunload Fires immediately before the object is unloaded. methods of window (IE) Method Description alert Displays a dialog box containing an application-defined message. attachEvent Binds the specified function to an event, so that the function gets called whenever the event fires on the object. blur Causes the element to lose focus and fires the onblur event. clearInterval Cancels the interval previously started using the setInterval method. clearTimeout Cancels a time-out that was set with the setTimeout method. close Closes the current browser window or HTML Application (HTA). confirm Displays a confirmation dialog box that contains an optional message as well as OK and Cancel buttons. createPopup Creates a popup wind
Thanks twseitex:-) . i ll try n let u knw .
-
Only one way function close is a pre-defined property of window object. Please use event bubbling of close() and window. Insert a new funktion that recives this event what you want (event handler). Prototyping of a function ... try it. events of window (IE) Event Description onactivate Fires when the object is set as the active element. onafterprint Fires on the object immediately after its associated document prints or previews for printing. onbeforedeactivate Fires immediately before the activeElement is changed from the current object to another object in the parent document. onbeforeprint Fires on the object before its associated document prints or previews for printing. onbeforeunload Fires prior to a page being unloaded. onblur Fires when the object loses the input focus. oncontrolselect Fires when the user is about to make a control selection of the object. ondeactivate Fires when the activeElement is changed from the current object to another object in the parent document. onerror Fires when an error occurs during object loading. onfocus Fires when the object receives focus. onhelp Fires when the user presses the F1 key while the browser is the active window. onload Fires immediately after the browser loads the object. onmove Fires when the object moves. onmoveend Fires when the object stops moving. onmovestart Fires when the object starts to move. onresize Fires when the size of the object is about to change. onresizeend Fires when the user finishes changing the dimensions of the object in a control selection. onresizestart Fires when the user begins to change the dimensions of the object in a control selection. onscroll Fires when the user repositions the scroll box in the scroll bar on the object. onunload Fires immediately before the object is unloaded. methods of window (IE) Method Description alert Displays a dialog box containing an application-defined message. attachEvent Binds the specified function to an event, so that the function gets called whenever the event fires on the object. blur Causes the element to lose focus and fires the onblur event. clearInterval Cancels the interval previously started using the setInterval method. clearTimeout Cancels a time-out that was set with the setTimeout method. close Closes the current browser window or HTML Application (HTA). confirm Displays a confirmation dialog box that contains an optional message as well as OK and Cancel buttons. createPopup Creates a popup wind
please, if possible can you give the example.