|
Rank: Member Groups: Member
Joined: 9/16/2008 Posts: 11
|
I have a need to view different type of files (doc/txt/pdf) using the fileexplorer, but currently it only supports images type files. Any suggestion how I can do that? How do I control the right split panel with my own page? (server side event/client side click event?)
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
Hi, I believe it's possible to implement your own preview panel by handling the FileExplorer's ClientSideOnFileSelected event handler: http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.FileExplorer.ClientSideOnFileSelected.htmlYou would then call the FileExplorer's getCurrentFile to get the path of the current selected file: http://www.essentialobjects.com/ViewDoc.aspx?t=JSDoc.Public.FileExplorer.getCurrentFile.htmlFrom there on you would then be able to perform whatever task you would like with that path. When you want to implement your own preview mechanism, you will want to modify the FileExplorer's LayoutTemplate to take out the default preview panel first. You may also find this topic helpful if you are not already familiar with our client side API: http://www.essentialobjects.com/ViewDoc.aspx?t=clientapi_howto.htmlThanks
|
|
Rank: Member Groups: Member
Joined: 9/16/2008 Posts: 11
|
I tried but got this message Microsoft JScript runtime error: Object doesn't support this property or method. Please advise.
the code
var testfile = eo_GetObject("FileExplorer1"); if (testfile) window.alert(testfile.getCurrentFile());
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
Hi,
Can you try "getSelectedFile" instead of "getCurrentFile"?
Thanks
|
|
Rank: Member Groups: Member
Joined: 9/16/2008 Posts: 11
|
Wow. That works. THANKS
|
|