JavaScript WebDAV Client
Date : 2008 03 10 Category : Tech & DevelopmentVladimir 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.
PLAIN TEXT JAVASCRIPT: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/>"; } }
