Created
January 10, 2018 06:58
-
-
Save quarinteen/55b42f3b4cb5ce9be7c78cf78d44af58 to your computer and use it in GitHub Desktop.
Create Folder JS
This file contains 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 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