locked
IE X button RRS feed

  • Question

  •  

    Hi All,

     

        is this possible if someone click on X button of IE then for example 

     

               if (info in not providede then ask for it and save it  )

    else (close the window)

     

     

    Thanks

    hassan   

    Monday, August 18, 2008 11:58 PM

Answers

  • Here's an example of the code you can use for this:

     

    window.attachEvent('onunload', MyCustomFunction);

     

    function MyCustomFunction

    {

      // do something, such as set the focus to a field and display an alert message

    }

     

    I believe you can place this into the form's onLoad event but if not then you'll need to go the unsupported route and add the code and related function to global.js or another core CRM js file or aspx page.

     

    -Tim

    Tuesday, August 19, 2008 4:25 AM