I POST the values to my server using jQuery (API call). The values are succesfully added to the db but I don't get any response from the server.
Here is my jquery for post .
$(document).ready(function () {
$('#signupConfirm').click(function () {
if (validateSignUpForm()) {
//check the availability of username.
// post all these vars into the API call
var signUpServiceUrl = 'http://xxxxxxxxxxxxxxxx';
var apiKey = 'xxxxxxxxxxxxxx';
var apiSecret = 'xxxxxxxxxxxxxxxxxxxx';
var userName = $('#username').val();
var email = $('#email1').val();
var password = $('#password1').val();
$.post(signUpServiceUrl, {
'api_key': apiKey,
'api_secret': apiSecret,
'username': userName,
'email': email,
'password': password
}, function (data) {
result = JSON.parse(data);
});
}
});
});
Is there any mistake in this?