Not Enough arguments error
I'm getting a Not enough arguments error. This script basically collects key/value pairs & gets them ready to be ajax'd to a .php handler file.
- var obj_data = {};
- obj_data['key'] = keystring; // Ex. Keystring: $easydb->key="x2nrdIpAmdorqMj4";
- var textData = new FormData();
- $.each(obj_data, function(k, v) { // apply object key/values to formData
- console.log(['Key, Value: ', k, v]);
- textData.append(k, v);
- });
- $.ajax({
- method: 'POST',
- url: 'assetPath/easydbkeysetup.php',
- data: textData
- })
- .done (function(response) {
- var rout = response.text;
- $('#easydbcredentialswrapper_stacks_in_20_page0 .success-message p').append('<span>' + rout + '</span>');
- })
- .fail (function(response) {
- var rout = response.text;
- $('#easydbcredentialswrapper_stacks_in_20_page0 .error-message p').append('<span>' + rout + '</span>');
- });
Here's an example page: [ Removed ]
I think it might be in my ajax call. When I comment it out, the error disappears, although might be in append.
Note: just have one key/value in this, but want to be able to handle many if needed.
So where is my code goofed up?