Javascript not working when UNC path

2 posts, 0 answers
  1. Razeen
    Razeen avatar
    10 posts
    Member since:
    Apr 2009

    Posted 10 Jul 2013 Link to this post

    <script type="text/javascript">
        function OnClientFileOpen(oExplorer, args)
        {
            //get the extension of the opened item
            var fileExt = args.get_item().get_extension();
            if (fileExt && fileExt.toLowerCase() == "pdf")
            {
                //cancel the default behavior
                args.set_cancel(true);
                //open new RadWindow
                var oWnd = radopen(args.get_item().get_path(), "RadWindow1");
                //set size to the newly opened RadWindow
                oWnd.setSize(600, 400);
                //if you want to open the PDF file in a new browser window
                //you can use the following code
                //window.open(args.get_item().get_path());
            }
        }
    </script>


    I am getting "The resource cannot be found." error when i use UNC path and the above javascript. Is there any solution for this problem?

    Thanks
  2. Corey
    Corey avatar
    3 posts
    Member since:
    Feb 2013

    Posted 13 Nov 2013 Link to this post

    This is what fixed it for me.

    Change
    var oWnd = radopen(args.get_item().get_path(), "RadWindow1");

    to

    var oWnd = radopen("FileSystemHandler.ashx?path=" + args.get_item().get_path(), "File Details");
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top