Handle frame close event
-
Hi, How can i handle frame close event.Actually i wanted to executed server side code when frame window is closed. I am opening this frame window from InitializeRow event of webgrid as shown below frame1.Attributes["src"] = "../Forms_PDF/" + srcFilePath; Whenever i close this frame window i need execute server side code. how can i do.
-
Hi, How can i handle frame close event.Actually i wanted to executed server side code when frame window is closed. I am opening this frame window from InitializeRow event of webgrid as shown below frame1.Attributes["src"] = "../Forms_PDF/" + srcFilePath; Whenever i close this frame window i need execute server side code. how can i do.
Frame is nothing but a window. How about body's onBeforeUnload or onUnload events for the documents that are loaded within that frame in discussion?
Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
The woods are lovely, dark and deep, But I have promises to keep, And miles to go before I sleep, And miles to go before I sleep! -
Frame is nothing but a window. How about body's onBeforeUnload or onUnload events for the documents that are loaded within that frame in discussion?
Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
The woods are lovely, dark and deep, But I have promises to keep, And miles to go before I sleep, And miles to go before I sleep!Hi Vasudevan, Thanks for reply,Actually i tried both the events but this event is triggering multiple time and the scenario is like this we are loading some data in the grid in parent form and on clickcellbutton event of the grid we are opening one document in the frame which will directly go to the print. But this printed document is getting saved in physical location.so on close of the this window(frame) we want to delete this file from the physical location. we already used onbeforeunload of parent window but this event is getting triggered multiple times. The issue is it shouldn't trigger the clickcellbutton event multiple times(it is triggering in load as well as unload). We tried both the events in parent form only as shown below. in parent form frame1.Attributes["src"] = "../Forms_PDF/" + srcFilePath; in javascript of parent form -- function HandleClose() { if( document.getElementById('hdnTemp').value=='Delete') { document.getElementById('btnFileRemove').click();//this 'btnFileRemove' is from frame window.so that we are executing server side code of frame from this parent form onunload event but is triggering twice. } } The thing is we need to execute server side code only when the frame window is closed.how we can achieve this.
-
Hi Vasudevan, Thanks for reply,Actually i tried both the events but this event is triggering multiple time and the scenario is like this we are loading some data in the grid in parent form and on clickcellbutton event of the grid we are opening one document in the frame which will directly go to the print. But this printed document is getting saved in physical location.so on close of the this window(frame) we want to delete this file from the physical location. we already used onbeforeunload of parent window but this event is getting triggered multiple times. The issue is it shouldn't trigger the clickcellbutton event multiple times(it is triggering in load as well as unload). We tried both the events in parent form only as shown below. in parent form frame1.Attributes["src"] = "../Forms_PDF/" + srcFilePath; in javascript of parent form -- function HandleClose() { if( document.getElementById('hdnTemp').value=='Delete') { document.getElementById('btnFileRemove').click();//this 'btnFileRemove' is from frame window.so that we are executing server side code of frame from this parent form onunload event but is triggering twice. } } The thing is we need to execute server side code only when the frame window is closed.how we can achieve this.