Skip to content

Instantly share code, notes, and snippets.

@quarinteen
Created January 10, 2018 06:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quarinteen/55b42f3b4cb5ce9be7c78cf78d44af58 to your computer and use it in GitHub Desktop.
Save quarinteen/55b42f3b4cb5ce9be7c78cf78d44af58 to your computer and use it in GitHub Desktop.
Create Folder JS
function createFolder(name) {
var encodedName = name; //$.URLEncode(name);
ajaxLoadingOn();
$.ajax({
type: 'POST',
url: "_IMAGES/TEST",
data: {
name: encodedName
},
dataType: "json",
success: function() {
ajaxLoadingOff();
window.location = encodedName + "/index.html";
},
error: function() {
ajaxLoadingOff();
alert('There was a problem creating the folder');
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment