Monday, March 10th, 2008

JavaScript WebDAV Client

Category: JavaScript, Library

<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.

javascript
< view plain text >
  1. var session = new ITHit.WebDAV.Client.WebDavSession();
  2. var folder;
  3. try {
  4.   folder = session.OpenFolder("http://server:8080/folder");
  5. } catch(e) {
  6.   if(e instanceof ITHit.WebDAV.Client.Exceptions.NotFoundException)
  7.     alert("Folder not found.");
  8.   else
  9.     throw e;
  10. }
  11.  
  12. if (folder != null) {
  13.   var items = folder.GetChildren(false);
  14.   for (var i=0; i<items .length; i++) {
  15.     document.getElementById("container").innerHTML += items[i].DisplayName + "<br/>";
  16.   }
  17. }

Related Content:

Posted by Dion Almaer at 1:54 am
2 Comments

+++--
3.8 rating from 31 votes

2 Comments »

Comments feed TrackBack URI

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

Comment by ITHit — January 22, 2009

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).

Comment by aslakhellesoy — March 12, 2009

Leave a comment

You must be logged in to post a comment.