Created
July 10, 2012 14:50
-
-
Save kyleondata/3083774 to your computer and use it in GitHub Desktop.
Javascript to handle getting the file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getDocItems(id) { | |
$.ajax({ | |
url: "<URL TO GET THE DOCUMENT>?id=" + id, | |
dataType: "json", | |
cache: false | |
}).error(function (jqXHR, textStatus) { | |
}).success(function (data) { | |
for (var key in data) { | |
var html = '<p><a href="<URL TO GET FILE>/GetFile?id=' + data[key].Id + '&type=' + data[key].MimeType + '" >' + data[key].FileName + '</a></p>'; | |
$('#YourElementId').append(html); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment