Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function test(x) {
- new Ajax.Request('/ajax.php',{
- method:'get',
- parameters: {user: "register", namecheck: v},
- onSuccess: function(transport){
- var json = transport.responseText.evalJSON();
- return ((json.istaken == 0) ? false : true); // This is what I need to return from test(x)
- },
- onFailure: function(){
- alert('Something went wrong...');
- return false; // Or this, in case of an error
- }
- });
- return false;
- }
Add Comment
Please, Sign In to add comment