Hi Eli
When user insert/edit the item and close (×) the Item form using upper left corner –□× (not Save,Unlock&Close)
I want the system can auto unlock this item , so in the form event I have one onUnload event like below
<p style="padding-left: 30px;">function MyFunc()
{</p>
<p style="padding-left: 60px;">var itm = document.thisItem;</p>
<p style="padding-left: 60px;">var chk =itm.fetchLockStatus();</p>
<p style="padding-left: 60px;">if (itm.fetchLockStatus()!="0" )</p>
<p style="padding-left: 60px;">{
top.onUnlockCommand();
}
}</p>
<p style="padding-left: 30px;">alert("check the method onunload");</p>
<p style="padding-left: 30px;">window.attachEvent("onunload", MyFunc);
top.MyFunc = MyFunc;</p>
But I try the onUnload or onBeforeUnload event the system doesn't trigger the method and show the alert("check the method onunload")
Thanks,