diff options
author | Julian Blake Kongslie <jblake@omgwallhack.org> | 2011-01-18 19:32:34 -0800 |
---|---|---|
committer | Julian Blake Kongslie <jblake@omgwallhack.org> | 2011-01-18 19:32:34 -0800 |
commit | 3edf86519c924c80ad0d000d7934cc5fdecd107e (patch) | |
tree | 9a0d2f92fcd8be1eea1306e9a9fe4fdc4c3fee94 /newuser.html | |
parent | fe5e958920cd2a31f2b72d46737bf90e9f9ac89b (diff) | |
download | hosting-3edf86519c924c80ad0d000d7934cc5fdecd107e.tar.gz hosting-3edf86519c924c80ad0d000d7934cc5fdecd107e.zip |
debugging
Diffstat (limited to 'newuser.html')
-rw-r--r-- | newuser.html | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/newuser.html b/newuser.html index 000976b..e817be5 100644 --- a/newuser.html +++ b/newuser.html @@ -12,10 +12,14 @@ $.post( "https://secure.dev.piny.be/piny-validate", { t: "Username", v: obj.value }, function( data ){ var res = $.parseJSON( data ); - if ( res.ok ) { - $("#username-error").removeClass( "error" ).html( "" ); + if ( res ) { + if ( res.ok ) { + $("#username-error").removeClass( "error" ).html( "" ); + } else { + $("#username-error").addClass( "error" ).html( res.msg ); + }; } else { - $("#username-error").addClass( "error" ).html( res.msg ); + $("#username-error").addClass( "error" ).html( "somehow res is null!" ); }; } ); |