summaryrefslogtreecommitdiff
path: root/newuser.html
diff options
context:
space:
mode:
authorJulian Blake Kongslie <jblake@omgwallhack.org>2011-01-18 19:32:34 -0800
committerJulian Blake Kongslie <jblake@omgwallhack.org>2011-01-18 19:32:34 -0800
commit3edf86519c924c80ad0d000d7934cc5fdecd107e (patch)
tree9a0d2f92fcd8be1eea1306e9a9fe4fdc4c3fee94 /newuser.html
parentfe5e958920cd2a31f2b72d46737bf90e9f9ac89b (diff)
downloadhosting-3edf86519c924c80ad0d000d7934cc5fdecd107e.tar.gz
hosting-3edf86519c924c80ad0d000d7934cc5fdecd107e.zip
debugging
Diffstat (limited to 'newuser.html')
-rw-r--r--newuser.html10
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!" );
};
} );