Last active
August 29, 2015 14:01
-
-
Save aGiftKit/0d628321cf2b50da4cc9 to your computer and use it in GitHub Desktop.
We use this function to encode the data that we are preparing to send in an Ajax call.
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
// return object as URL encoded string | |
// I did not write this code, it was pasted from somewhere. | |
UrlEncodeObj = function (o) { | |
var sdata = ''; | |
for (var k in o) { | |
if (sdata) { | |
sdata += '&'; | |
} | |
sdata += k + '=' + escape(o[k]); | |
} | |
return sdata; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment