"File Browsing has been blocked." inside AJAX TabContainer

Last post 10-19-2010, 8:45 PM by cutechat. 20 replies.
Page 1 of 2 (21 items)   1 2 Next >
Sort Posts: Previous Next
  •  12-01-2008, 2:35 PM 46461

    "File Browsing has been blocked." inside AJAX TabContainer

    Hi,
     
    the error message "File Browsing has been blocked." always appear when the control is inside an AJAX TabContainer.  Please test the following code:
     

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Upload.aspx.vb" Inherits="Upload" %>
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <title></title>
    </head>
    <body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="Server"/>

    <ajaxToolkit:TabContainer ID="TabContainer1" runat="server">
    <ajaxToolkit:TabPanel ID="Panel1" runat="server" HeaderText="Panel1">
    <ContentTemplate>
    Click on Panel2 and then on Upload
    </ContentTemplate>
    </ajaxToolkit:TabPanel>

    <ajaxToolkit:TabPanel ID="Panel2" runat="server" HeaderText="Panel2">
    <ContentTemplate>

    <CuteWebUI:Uploader runat="server" ID="Uploader1" MultipleFilesUpload="true" InsertText="Upload" >
    <ValidateOption MaxSizeKB="10240"/>
    </CuteWebUI:Uploader>

    </ContentTemplate>
    </ajaxToolkit:TabPanel>
    </ajaxToolkit:TabContainer>

    </form>
    </body>
    </html>

    Could you provide a solution for this?
  •  12-02-2008, 10:54 AM 46480 in reply to 46461

    Re: "File Browsing has been blocked." inside AJAX TabContainer

    Hi Dev65,
     
    I tested you coed, it works for me.
     
    Please set the UploadType='IFrame' and try again, for example:
     
       <CuteWebUI:Uploader runat="server" ID="Uploader1" UploadType="IFrame">
       </CuteWebUI:Uploader>
     
    And do you use Flash 10?
     
    For the Flash10 , sometimes we need the users click again , (if the page layout is not compatible with uploader script code)
     
    You can disabled the Flash10 by this way (in the last version)
     
    uploader.SetAdvancedOption(UploaderAdvancedOption.NoFlash10,"true");
     
    So that if you use Flash 10, it would change to the IFrame mode.
     
     
    Regards,
     
    Ken
  •  12-02-2008, 4:17 PM 46490 in reply to 46480

    Re: "File Browsing has been blocked." inside AJAX TabContainer

    Hi Ken,
     
    when I set UploadType="IFrame" then it works, but I can only upload one file with you control. I want to use your product for uploading multiple files. Also when I set uploader.SetAdvancedOption(UploaderAdvancedOption.NoFlash10,"true") then I can only upload one file and not multiple.

    Yes, I use Flash10. Many people use Flash 10 now. So the code above does not work with Flash10 or does it not work with AJAX TabContainer in combination with Flash 10?

    My code code works when I click to the message "File Browsing has been blocked.".
    But this is not a good solution to use this product when our clients wants to upload files.
    Have you a fix?
     
    Thanks!
     

     
  •  12-02-2008, 9:02 PM 46492 in reply to 46490

    Re: "File Browsing has been blocked." inside AJAX TabContainer

    Hi,
     
    Flash 10 has a wellknown problem that block the file dialog.
     
    So we put a real Flash object to cover the button.
     
    For you example , I think our positioning function not works,
     
    So when the user click the button object, the AjaxUploader can only show the warning panel, let the user click again.
     
    We will check your example again , and adjust the Flash object position.
     
    Regards,
    Terry
  •  12-03-2008, 5:44 PM 46537 in reply to 46492

    Re: "File Browsing has been blocked." inside AJAX TabContainer

    Hi Terry,
     
    it seems to be a bigger problem because after Postback always the message "File Browsing has been blocked." 
    That's not good. Please test my new code below:
     

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Upload.aspx.vb" Inherits="Upload" %>
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
    <title></title>
    </head>
    <body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="Server"/>
    <ajaxToolkit:TabContainer ID="TabContainer1" runat="server">
    <ajaxToolkit:TabPanel ID="Panel1" runat="server" HeaderText="Panel1">
    <ContentTemplate>
    Click on Panel2 and then on Upload
    </ContentTemplate>
    </ajaxToolkit:TabPanel>

    <ajaxToolkit:TabPanel ID="Panel2" runat="server" HeaderText="Panel2">
    <ContentTemplate>

    <CuteWebUI:Uploader runat="server" ID="Uploader1" MultipleFilesUpload="true" InsertText="Upload" >
    <ValidateOption MaxSizeKB="10240"/>
    </CuteWebUI:Uploader>

    </ContentTemplate>
    </ajaxToolkit:TabPanel>
    </ajaxToolkit:TabContainer>
    <br />
    <asp:Button ID="button1" runat="server" Text="Postback" />
    </form>
    </body>
    </html>


    The "Postback" button I put is new. Please load this code and then click on the "Panel2" and then the "Upload" Button.
    ->  "File Browsing has been blocked." appears
     
    Now click back to "Panel1" and click on the "Postback" button and then back to "Panel2" and then "Upoad" button.
    ->  "File Browsing has been blocked." appears
     
    I tested this with IE7 and Flash10 because most of our clients have this configuration.

    Can you provide a solution for this problem?

    Thanks!
  •  12-08-2008, 12:12 PM 46658 in reply to 46537

    Re: "File Browsing has been blocked." inside AJAX TabContainer

    Hi Terry,
     
    any news? When do you provide a solution for this problem?
    Thanks!
  •  12-08-2008, 8:06 PM 46667 in reply to 46658

    Re: "File Browsing has been blocked." inside AJAX TabContainer

    Hi,
     
    We will provide a solution with 24 hours.
     
    Regards,
    Terry
  •  12-10-2008, 5:18 AM 46734 in reply to 46667

    Re: "File Browsing has been blocked." inside AJAX TabContainer

    Hi Terry,
     
    thanks a lot.  I just downloaded AjaxUploader.zip but the error still exists. The .dll date is from 7th of December.
     
    When will be the fixed version downloadable?
     
    Thanks!
  •  12-12-2008, 4:51 AM 46850 in reply to 46667

    Re: "File Browsing has been blocked." inside AJAX TabContainer

    Hi Terry,
     
    It is still not working.
     
    Can you please reply? Thank you.
  •  12-13-2008, 9:40 AM 46887 in reply to 46850

    Re: "File Browsing has been blocked." inside AJAX TabContainer

    Hi,
     
    Please download the uploader again. 
     
    The flash10 do not allow javascript to open the file browsing dialog.
     
    So our implementation is make a flash-mask over the button.
     
    The uploader are not able to position a flash-mask to cover the button for you case .
     
    So you need write a javascript function like this , and try to move the 'flashdiv' to the 'button' :
     
    function CuteWebUI_AjaxUploader_OnMantleButton(button,flashdiv)
    {
        //use this line to see the floating flash object
        flashdiv.style.backgroundColor="red";
        var l=parseInt(flashdiv.style.left)
        var t=parseInt(flashdiv.style.top)
        l=l+88;//try to found a best value to move the flashdiv
        t=t+77;//
        flashdiv.style.left=l+"px";
        flashdiv.style.top=t+"px";
    }
     
     
    Regards,
    Terry
     
  •  12-14-2008, 6:36 AM 46907 in reply to 46887

    Re: "File Browsing has been blocked." inside AJAX TabContainer

    Hi Terry,
     
    thank you for your answer but it still does not work correctly with IE7 and Flash10a.ocx. When I hit the "Postback" button and switch the panel and then click on "Upload" then the window "File Browsing has been blocked." appears. How can this be completly be fixed? I mean other multi upload controls like google work perfectly. Can you provide a clean solution?
     
    Also I don't understand your code. Can you please help me how I get your code to work with my code below?
    Many thanks for your help!
     
     

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Upload.aspx.vb" Inherits="Upload" %>
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
    <title></title>
    </head>
    <body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="Server"/>
    <ajaxToolkit:TabContainer ID="TabContainer1" runat="server">
    <ajaxToolkit:TabPanel ID="Panel1" runat="server" HeaderText="Panel1">
    <ContentTemplate>
    Click on Panel2 and then on Upload
    </ContentTemplate>
    </ajaxToolkit:TabPanel>

    <ajaxToolkit:TabPanel ID="Panel2" runat="server" HeaderText="Panel2">
    <ContentTemplate>

    <CuteWebUI:Uploader runat="server" ID="Uploader1" MultipleFilesUpload="true" InsertText="Upload" >
    <ValidateOption MaxSizeKB="10240"/>
    </CuteWebUI:Uploader>

    </ContentTemplate>
    </ajaxToolkit:TabPanel>
    </ajaxToolkit:TabContainer>
    <br />
    <asp:Button ID="button1" runat="server" Text="Postback" />
    </form>
    </body>
    </html>
  •  12-18-2008, 11:34 AM 47100 in reply to 46907

    Re: "File Browsing has been blocked." inside AJAX TabContainer

    Hi,
     
    I have wrote a temporary code for your condition. We will embed this way into the uploader for next release.
     
    Please try this now :
     

    <%@ Page Language="VB" AutoEventWireup="false" %>

    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
     <title></title>
    </head>
    <body>
     <form id="form1" runat="server">
      <asp:ScriptManager ID="ScriptManager1" runat="Server" />
      <ajaxToolkit:TabContainer ID="TabContainer1" runat="server">
       <ajaxToolkit:TabPanel ID="Panel1" runat="server" HeaderText="Panel1">
        <ContentTemplate>
         Click on Panel2 and then on Upload
        </ContentTemplate>
       </ajaxToolkit:TabPanel>
       <ajaxToolkit:TabPanel ID="Panel2" runat="server" HeaderText="Panel2">
        <ContentTemplate>
         <CuteWebUI:Uploader runat="server" ID="Uploader1" MultipleFilesUpload="true" InsertText="Upload"
          UploadType="Flash">
          <ValidateOption MaxSizeKB="10240" />
         </CuteWebUI:Uploader>
        </ContentTemplate>
       </ajaxToolkit:TabPanel>
      </ajaxToolkit:TabContainer>
      <br />
      <asp:Button ID="button1" runat="server" Text="Postback" />
     </form>

     <script>
     var theuploader=document.getElementById("<%=Uploader1.ClientID %>");
     var thebutton;
     var theflashdiv;
     var theflashobj;
     var laststatus="";
     function CuteWebUI_AjaxUploader_OnMantleButton(button,flashdiv)
     {
      thebutton=button;
      theflashdiv=flashdiv;
      theflashobj=flashdiv.firstChild;
      //use this line to see the floating flash object
      //flashdiv.style.backgroundColor="red";
     }
     function checkbutton()
     {
      if(!thebutton)return;
      var nowstatus="visible";
      for(var n=thebutton;n!=null&&n.style!=null;n=n.parentNode)
      {
       if(n.style.display=='none')
       {
        nowstatus="none";
       }
      }
      if(nowstatus!=laststatus)
      {
       laststatus=nowstatus;
       if(laststatus=="visible")
       {
        theflashdiv.style.display="";
        var pos=CalcPosition(theflashdiv,thebutton);
        theflashdiv.style.left=pos.left+"px";
        theflashdiv.style.top=pos.top+"px";
        theflashdiv.style.width=theflashobj.style.width=thebutton.offsetWidth+"px";
        theflashdiv.style.height=theflashobj.style.height=thebutton.offsetHeight+"px";
        theflashdiv.style.zIndex=12345672;
       }
       else
       {
        theflashdiv.style.display="none";
       }
      }
     }
     setInterval(checkbutton,100);
     </script>

     <script>


     //get the position of a element ( by the scroll offset )
     function GetScrollPostion(e)
     {
      var b=window.document.body;
      var p=b;
      if(window.document.compatMode=="CSS1Compat")
      {
       p=window.document.documentElement;
      }
      
      if(e==b)return {left:0,top:0};

      //if(e.getBoundingClientRect)
      //{
      // var b=e.getBoundingClientRect();
      // return {left:p.scrollLeft+b.left,top:p.scrollTop+b.top};
      //}

      var l=0;
      var t=0;
      var box;
      var offset;

      l = e.offsetLeft;
      t = e.offsetTop;
      offset = e.offsetParent;
      if (offset != e) {
       while (offset) {
        l += offset.offsetLeft;
        t += offset.offsetTop;
        offset = offset.offsetParent;
       }
      }
      if (window.opera) {
       offset = e.offsetParent;
       while (offset && offset.tagName.toUpperCase() != "BODY" && offset.tagName.toUpperCase() != "HTML") {
        l -= offset.scrollLeft;
        t -= offset.scrollTop;
        offset = offset.offsetParent;
       }
      }
      else {
       offset = e.parentNode;
       while (offset && offset.tagName.toUpperCase() != "BODY" && offset.tagName.toUpperCase() != "HTML") {
        l -= offset.scrollLeft;
        t -= offset.scrollTop;
        offset = offset.parentNode;
       }
      }
      return {left:l,top:t}
     }
     //get the position of a element ( by the client offset )
     function GetClientPosition(e)
     {
      var b=window.document.body;
      var p=b;
      if(window.document.compatMode=="CSS1Compat")
      {
       p=window.document.documentElement;
      }
      
      if(e==b)return {left:-p.scrollLeft,top:-p.scrollTop};
      
      if(e.getBoundingClientRect)
      {
       var b=e.getBoundingClientRect();
       return {left:b.left-p.clientLeft,top:b.top-p.clientTop};
      }
      
      var l=0;
      var t=0;
      for(var e1=e;e1!=null&&e1!=b;e1=e1.offsetParent)
      {
       l+=e1.offsetLeft;
       t+=e1.offsetTop;
      }
      return {left:l-p.scrollLeft,top:t-p.scrollTop}
     }
     //get absolute or relative parent
     function GetStandParent(e)
     {
      if(e.currentStyle)
      {
       for(var pe=e.parentElement;pe!=null;pe=pe.parentElement)
       {
        var sp=pe.currentStyle.position;
        if(sp=="absolute"||sp=="relative")
         return pe;
       }
      }
      else
      {
       var view=e.ownerDocument.defaultView;
       for(var pe=e.parentNode;pe!=null&&pe.nodeType==1;pe=pe.parentNode)
       {
        var sp=view.getComputedStyle(pe, "").getPropertyValue("position")
        if(sp=="absolute"||sp=="relative")
         return pe;
       }
      }
      return (e.ownerDocument||e.document).body;
     }
     //calc the position of floate that relative to e
     function CalcPosition(floate,e)
     {
      var epos=GetScrollPostion(e);
      var spos=GetScrollPostion(GetStandParent(floate));
      var s=GetStandParent(floate);
      var pos={left:epos.left-spos.left-(s.clientLeft||0),top:epos.top-spos.top-(s.clientTop||0)};
      return pos
     }

     </script>

    </body>
    </html>

     
    Regards,
    Terry
     
  •  12-18-2008, 1:24 PM 47103 in reply to 47100

    Re: "File Browsing has been blocked." inside AJAX TabContainer

    Hi Terry,

    great! It works perfectly!

    A very big thanks for your programming and solving this problem!
     
    When will be the next release with the embeded code?
     
    Again Thanks!
  •  12-22-2008, 11:10 PM 47190 in reply to 47103

    Re: "File Browsing has been blocked." inside AJAX TabContainer

    Hi,
     
    You are welcome.
     
    We have embed the code.
     
    Please download the control and try again.
     
    Regards,
    Terry
  •  01-11-2009, 4:30 AM 47630 in reply to 47190

    Re: "File Browsing has been blocked." inside AJAX TabContainer

    I am having a similar issue with the UploadAttachments control not working with Flash 10 on Firefox 3 when inside a TabContainer. For me, I dont get any error messages, the "upload files" button is disabled. Im using the latest version you distributed a few days ago with theurl rewriting fix.
     
    Thoughts?
     
    CT
  •  01-12-2009, 2:24 PM 47669 in reply to 47630

    Re: "File Browsing has been blocked." inside AJAX TabContainer

    This is still happening for me. I also tested using jQuery tabs instead of the ASP.NET Ajax Tab Container; it broke there as well.
     
    CT
  •  01-12-2009, 6:16 PM 47673 in reply to 47669

    Re: "File Browsing has been blocked." inside AJAX TabContainer

    Can someone from Cutesoft support please answer?
  •  01-14-2009, 10:23 AM 47736 in reply to 47673

    Re: "File Browsing has been blocked." inside AJAX TabContainer

    craigtadlock ,
     
    Can you provide a demo code which not works?
    That will help us to improve it.
     
    Regards,
    Terry
  •  07-06-2009, 5:01 AM 53747 in reply to 47190

    Re: "File Browsing has been blocked." inside AJAX TabContainer

    cutechat:
    Hi,
    I have the same problem with AjaxUplouder. Control not working with flash10 on IE 7 on Win XP Professional but it works fine on Win Server 2008. My code works when I click to the message "File Browsing has been blocked.", but I think that is not a good solution for ouer clients.
    I am using the latest version you distributed.
     
    Please help!
     
    Regards,
    Bart
  •  10-18-2010, 2:51 PM 64480 in reply to 47100

    Re: "File Browsing has been blocked." inside AJAX TabContainer

    I have a situation where my client needs to launch file attachment from multiple places on a page.
     
    So I am using javascript to click the ImageButton that has been assigned to the InserButtonID property of the Upload control.
     
    So when in Flash upload mode I get the file browsing dialog blocked message.
     
    Using the IFrame upload mode works fine in IE and Safari, however not in Firefox since FFox does not allow clicking the <input type=file tag with script.
     
    Is there possibly a way to use a Flash solution to circumvent the file browsing dialog message for Firefox? i.e. click the ImageButton using Flash instead of Javascript.
     
    Your assistance would be greatly appreciated.
     
    Thanks,
    Tim
Page 1 of 2 (21 items)   1 2 Next >
View as RSS news feed in XML