Monday, March 10th, 2008
JavaScript WebDAV Client
<p>
Vladimir Lichman of IT Hit has released an Ajax library for managing WebDAV servers.
The library is compliant with WebDAV RFC 2518 and allows management of Class 1 and Class 2 complaint WebDAV servers. With IT Hit AJAX Library you can copy, move and delete items, read and set custom properties, lock items and discover locks. It is written entirely in JavaScript and supports IE, Firefox, Safari and Netscape.
-
-
var session = new ITHit.WebDAV.Client.WebDavSession();
-
var folder;
-
try {
-
folder = session.OpenFolder("http://server:8080/folder");
-
} catch(e) {
-
if(e instanceof ITHit.WebDAV.Client.Exceptions.NotFoundException)
-
alert("Folder not found.");
-
else
-
throw e;
-
}
-
-
if (folder != null) {
-
var items = folder.GetChildren(false);
-
for (var i=0; i<items .length; i++) {
-
document.getElementById("container").innerHTML += items[i].DisplayName + "<br/>";
-
}
-
}
-
Related Content:











We have just released beta of our new product – AJAX File Browser that is based on the above library. Here is the online demo: http://www.ajaxfilebrowser.com
Our AJAX File Browser is a cross-browser web-based file manager that utilizes standards-compliant WebDAV XML for communicating with server.
The AJAX File Browser provides integration with Microsoft Office applications, so you can create and open for editing Word, Excel and PowerPoint documents directly from AJAX File Browser interface.
AJAX File Browser Home: http://www.webdavsystem.com/ajaxfilebrowser
Download: http://www.webdavsystem.com/ajaxfilebrowser/download
You may also want to check out my WebDAV.js at http://github.com/aslakhellesoy/webdavjs/tree/master
It’s a very simple implementation that does the basics. It comes with a simple example that demonstrates usage.
There are also jsspec tests that can be run from Ant (using Rhino).