|
// 2010 - [Your name]
$(document).ready(function(){$('#divSignup input').val('');$('#userName').focus();});function RegisterUser(){var dataChecked=true;$('#divSignup input').each(function(){if($(this).val()==''){alert('Complete form');dataChecked=false;return false;}});if(!dataChecked)return;var user=new UserJs();user.FirstName=$('#firstName').val();user.Surname=$('#surname').val();user.Username=$('#userName').val();user.Password=$('#password').val();SignupUser_Proxy.RegisterUser(user,successCallback,failureCallback);}
var successCallback=function(data){if(data.d==true){alert('User registered');$('#divSignup input').val('');return;}
else{alert('User not registered');}}
var failureCallback=function(data){alert('Request failure');}
function SignupUser_Proxy(){}
SignupUser_Proxy.RegisterUser=function(userJs,successCallback,failureCallback){var jsonData=JSON.stringify({userJs:userJs});$.ajax({type:"POST",contentType:"application/json; charset=utf-8",url:"SignupUser.aspx/RegisterUserService",data:jsonData,success:successCallback,error:failureCallback});}
function UserJs(){this.FirstName='';this.Surname='';this.Username='';this.Password='';}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I'm the very proud father of
SyMenu, a multi awarded portable start menu and
www.ghezee.com an innovative ads web site.