Explorer on a non-SharePoint page.
Does anyone know if it is possible to embed the explorer view for a document library on a page outside of a SharePoint site? Id like to use this functionality in an ASPX application completely independent of SharePoint. I am aware of the web services available, the issue is that there is a built-in folder viewer and not a programmatic link to SharePoint.
a source to share
I ended up deconstructing the original explorer view and reworking it to this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Shared Documents</TITLE>
<SCRIPT language=javascript src="http://[host]/_layouts/1033/init.js" type=text/javascript></SCRIPT>
<SCRIPT language=javascript src="http://[host]/_layouts/1033/core.js" defer type=text/javascript></SCRIPT>
</HEAD>
<BODY scroll=yes onload="NavigateHttpFolderIfSupported('http:\u002f\u002f[host]\u002fsites\u002f[site]\u002fShared Documents', 'expFrame');">
<FORM id=aspnetForm name=aspnetForm>
<IFRAME id=expFrame name=expFrame width=800 height=500></IFRAME>
</FORM>
</BODY></HTML>
It might be possible to do it a little neatly, but it certainly works.
a source to share
While you might think that some ActiveX control needs special stuff from Sharepoint, Explorer View is just baked right into IE. As long as you've previously used it in SharePoint in a Windows session, as many things as shown below, you'll see the browser's perspective:
<iframe src="\\path\to\sharepoint\webdav\folder">
You can do this using the well-known Windows Explorer if the page is hosted locally or on your intranet. Just try creating a local test html file with something like:
<iframe src="c:\">
Remember that you will run into some problems doing it this way, since the authentication must be passed to SharePoint. The best way I have found is to copy core.js from Sharepoint, cut everything in it except the navigation stuff, and remove any calls in those methods for things that are not available, then use NavigateHttpFolderIfSupported () to navigate to " http: // path / to / sharepoint / webdav / folder ".
The only problem I've run into with this method is some IE8 incompatibilities, so watch out for that. I'm pretty sure it has something to do with cross-site scripting protection and calling inside core.js, but this whole file feels very goldberg-esque and I don't want to mess with it.
a source to share