diff options
author | Julian Blake Kongslie <jblake@omgwallhack.org> | 2011-01-18 19:27:13 -0800 |
---|---|---|
committer | Julian Blake Kongslie <jblake@omgwallhack.org> | 2011-01-18 19:27:13 -0800 |
commit | fe5e958920cd2a31f2b72d46737bf90e9f9ac89b (patch) | |
tree | 878d3802bc9af295ff0d4a945df4f843ea51e1bb | |
parent | 6a50ab45e07705e9cddfff5e2e4e1625c112ffc4 (diff) | |
download | hosting-fe5e958920cd2a31f2b72d46737bf90e9f9ac89b.tar.gz hosting-fe5e958920cd2a31f2b72d46737bf90e9f9ac89b.zip |
Test validation thing.
-rw-r--r-- | newuser.html | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/newuser.html b/newuser.html index 41fe969..000976b 100644 --- a/newuser.html +++ b/newuser.html @@ -5,7 +5,22 @@ <script type="text/javascript"> $(document).ready(function(){ + $("#pass2-row").css( "display", "block" ); + + $("#username").change(function( obj ){ + + $.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( "" ); + } else { + $("#username-error").addClass( "error" ).html( res.msg ); + }; + } ); + + }); + }); </script> |