<script type="text/javascript">
$("#sign_up").on('click', function() {
$.post('./includes/ajax.php', { action: 'register' } , function(result) {
var result = JSON.parse(result);
if(result ) { $("#register_result") = result; document.write(result); }
});
});
$("#register_form").submit(function() {
return false;
});
</script>
In the console it's returning "All inputs must be entered" - which is what I want it to return.
However, the alert is returning [object Object]. Why is this?
Quentin :
console.log will give you a debugging view of an object.\n\nalert will give you a string view of an object.\n\nObjects are converted to strings by calling .toString() on them.\n\nThe default toString() function on a basic object will return \"[Object object]\"",
2013-09-01T21:44:38