ExportWebPart javascript bug in ASP.NET AJAX Futures 2007

Last post 05-05-2009 4:40 AM by alessandro. 1 replies.

Sort Posts:

  • ExportWebPart javascript bug in ASP.NET AJAX Futures 2007

    01-11-2009, 10:41 PM
    • Member
      164 point Member
    • smasher9
    • Member since 05-14-2008, 1:41 PM
    • Posts 153

     

    Hi, 

    I use ASP.NET AJAX Futures 2007 for Drag Drop support in FireFox. But in IE the Export web part feature stops working now.

    I found that, the WebPartManager javascript object in ASP.NET AJAX Futures JS library doesn't have the ExportWebPart method which is called to export web part. (The original ASP.Net WebPartManager javascript object has this method).

     Is there any solution for this problem? Will it be fixed in the next version of ASP.NET AJAX Futures?

     Thanks.

    Believe to yourself!
  • Re: ExportWebPart javascript bug in ASP.NET AJAX Futures 2007

    05-05-2009, 4:40 AM
    • Contributor
      6,788 point Contributor
    • alessandro
    • Member since 06-25-2002, 10:05 AM
    • Italy
    • Posts 1,103

     hi, I just had to deal with this myself. The function seems to have been disabled in the core script files. You may try re-enabling it again until a permanent fix is available. Add the following script block in your page (preferably the masterpage)

      

    <script type="text/javascript">
    function pageLoad()
    {
        if (__wpm != null)
        {
            if (!__wpm.ExportWebPart)
                __wpm.ExportWebPart = WebPartManager_ExportWebPart2;
        }
    }
    function WebPartManager_ExportWebPart2(exportUrl, warn, confirmOnly) {
        if (warn == true && __wpmExportWarning.length > 0 && this.personalizationScopeShared != true) {
            if (confirm(__wpmExportWarning) == false) {
                return false;
            }
        }
        if (confirmOnly == false) {
            window.location = exportUrl;
        }
        return true;
    }
    </script>
    

    Also note that I have taken the liberty to change the original function name from 
    WebPartManager_ExportWebPart to WebPartManager_ExportWebPart2 ; this is done on purpose in case ms decided to fix this in a future release, you won't go into conflict and it should just work whether you remember to remove the above workaround or not.

    Have a good day,

     

     

    Alessandro Zifiglio
    www.jiffycms.net - opensource HTML Editor for ASP.NET
    http://weblogs.asp.net/alessandro


    In the land of the blind, the man with one eye is king!:x
    Filed under:
Page 1 of 1 (2 items)