dav.js

Displays a WebDav Browser window for file picking/opening/saving.


Functions


OAT.WebDav.init(options)

Creates WebDav Browser window and sets various configuration options, if needed. All possible options:

OAT.WebDav.openDialog(options)

Opens the Browser in file browse mode. User can select a file, which will be passed back to application. All options passed to init can be used here. Additional specific options:

OAT.WebDav.saveDialog(options)

Opens the Browser in file save mode. User can select a new/existing file, the Browser will then save specified data to that file. All options passed to init can be used here. Additional specific options:

var options = {
	user:"demo",
	pass:"demo",
	path:"/DAV/home/demo/",
	isDav:true,
	extensionFilters:[
		["all",         "*",   "All files",     "text/plain"],
		["xmldoc",      "xml", "XML Documents", "text/xml"],
		["xmltemplate", "xml", "XML Templates", "application/xml"]
	]
}

OAT.WebDav.init(options);

function showContents(path, file, data) {
	alert(path+file+' contains:\n\n'+data);
}

OAT.WebDav.openDialog({callback:showContents});