Click ok to resume file

Last post 03-17-2009, 9:10 PM by CIC Web. 7 replies.
Sort Posts: Previous Next
  •  03-10-2009, 2:13 AM 49666

    Click ok to resume file

    I'm trying to throw a custom exception, but the prompt always has "Click ok to resume file".
     
    Can this be removed?
     
    Thanks!
  •  03-10-2009, 2:21 AM 49668 in reply to 49666

    Re: Click ok to resume file

    Hi,
     
    That is a new feature to ask the user try again or cancel it.
     
    Currently we haven't provide a property to disable that feature.
     
    But you can process it by this way :
     
    <script>
    function CuteEditor_AjaxUploader_OnError(msg)
    {
     alert(msg);
     uploader.setresumeoption("Cancel");
     return false;
    }
    </script>
     
    for editor , the function name is CuteEditor_AjaxUploader_OnError , and for CuteWebUI.AjaxUploader , the function name is
    CuteWebUI_AjaxUploader_OnError 
     
    Regards,
    Terry
  •  03-10-2009, 7:40 PM 49716 in reply to 49668

    Re: Click ok to resume file

    Hi cutechat,
     
    so in this case,
     
    protected void InputFile_FileValidating(object sender, UploaderEventArgs args)
        {
           throw new ArgumentException
        }
     
     
    where will the function "CuteWebUI_AjaxUploader_OnError" take place.
     
    Thanks for the help!
     
  •  03-11-2009, 12:43 AM 49723 in reply to 49716

    Re: Click ok to resume file

    Hi,
     
    It's javascript code.
     
    Please put it into any position of the HTML
     
    Regards,
    Terry
     
  •  03-11-2009, 1:52 AM 49728 in reply to 49723

    Re: Click ok to resume file

    Hi Terry,
     
    I tried to insert this code on the <head> part of "SelectFile.aspx" but still the "resume" statement is there.
     
    Am I placing it on the wrong page?
  •  03-11-2009, 1:27 PM 49757 in reply to 49728

    Re: Click ok to resume file

    Sorry,
     
    The correct code should be :
     
    <script>
    function CuteEditor_AjaxUploader_OnError(msg)
    {
     alert(msg);
     uploader=this;
     uploader.setresumeoption("Cancel");
     return false;
    }
    </script>
     
     
    BTW , do you get the alert message ? Please try CuteWebUI_AjaxUploader_OnError(msg) too.
     
    Regards,
    Terry
     
     
  •  03-15-2009, 11:30 PM 49903 in reply to 49757

    Re: Click ok to resume file

    Hi Terry,
     
    I tried both on my aspx file and also the "SelectFile.aspx" inside CuteEditor.
     
    <script type="text/javascript">
            function CuteEditor_AjaxUploader_OnError(msg)
            {
             alert(msg);
             uploader=this;
             uploader.setresumeoption("Cancel");
             return false;
            }
            
            function CuteWebUI_AjaxUploader_OnError(msg)
            {
             alert(msg);
             uploader=this;
             uploader.setresumeoption("Cancel");
             return false;
            }
        </script>
     
    but still the save "Ok to resume file" comes out...
     
    Kindly correct if I'm wrong.
     
    Thanks!

     
     
  •  03-17-2009, 9:10 PM 50006 in reply to 49903

    Re: Click ok to resume file

    It's strange now I get the JS error
     
    "Object doesn't support this property or method"
     
    <script type="text/javascript">
            function CuteEditor_AjaxUploader_OnError(msg)
            {
         
                alert(msg);
                uploader=this;
                uploader.setresumeoption("Cancel");
                return false;
            
            }
            
            function CuteWebUI_AjaxUploader_OnError(msg)
            {
           
                alert(msg);
                uploader=this;
                uploader.setresumeoption("Cancel");
                return false;
            }
        </script>
     
    I've placed this on the bottom of the SelectFile.aspx  Is it the "setresumeoption" that's causing this?
View as RSS news feed in XML