L
lee_youjin
I needed to defect when the user is clicking the IE X button ( top
right). so I could execute the cleanup function.
I was able to detect it using onbeforeunload event. Now I need to call
the function in code behind from onbeforeunload event call.
but that is where I have a problem...
please refer my code below
my body tag - <body onbeforeunload = "X_close()">
Javascript - function X_close( ) { if ( window.event.clientX < 0 ||
window.event.clientY < 0) { alert("test") } }
Is there a way I can call Cleanup func from X_close func? or is there
some other way to do this.. Any help appreciated!!!!!!! Thanks!!!
In my post back I have the code below. but this doesn't work.... It
should work I think.
Dim Script As String
Script = "<script language=""javascript"" type=""text/javascript"">"
Script &= "function X_close() { alert(""KKKKK"");}"
Script &= "</script>"
If (Not IsClientScriptBlockRegistered("clientScript")) Then
RegisterClientScriptBlock("clientScript", Script)
End If
Cleanup function ( vb.net)
Private Sub Cleanup(ByVal LineID As Integer)
Dim resourceData As New ResourceMaterial
resourceData.cleanup(LineID)
End Sub
right). so I could execute the cleanup function.
I was able to detect it using onbeforeunload event. Now I need to call
the function in code behind from onbeforeunload event call.
but that is where I have a problem...
please refer my code below
my body tag - <body onbeforeunload = "X_close()">
Javascript - function X_close( ) { if ( window.event.clientX < 0 ||
window.event.clientY < 0) { alert("test") } }
Is there a way I can call Cleanup func from X_close func? or is there
some other way to do this.. Any help appreciated!!!!!!! Thanks!!!
In my post back I have the code below. but this doesn't work.... It
should work I think.
Dim Script As String
Script = "<script language=""javascript"" type=""text/javascript"">"
Script &= "function X_close() { alert(""KKKKK"");}"
Script &= "</script>"
If (Not IsClientScriptBlockRegistered("clientScript")) Then
RegisterClientScriptBlock("clientScript", Script)
End If
Cleanup function ( vb.net)
Private Sub Cleanup(ByVal LineID As Integer)
Dim resourceData As New ResourceMaterial
resourceData.cleanup(LineID)
End Sub