This is a migrated thread and some comments may be shown as answers.

Javascript not working when UNC path

1 Answer 112 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Razeen
Top achievements
Rank 1
Razeen asked on 10 Jul 2013, 10:07 AM
<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

1 Answer, 1 is accepted

Sort by
0
Corey
Top achievements
Rank 1
answered on 13 Nov 2013, 04:42 PM
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");
Tags
FileExplorer
Asked by
Razeen
Top achievements
Rank 1
Answers by
Corey
Top achievements
Rank 1
Share this question
or