* login process
* register page * post query * get query
This commit is contained in:
		@@ -5,14 +5,23 @@ $(document).ready(function() {
 | 
			
		||||
    var username = $("#userfield")[0].value;
 | 
			
		||||
    var password = $("#passfield")[0].value;
 | 
			
		||||
 | 
			
		||||
    $.get('/senddata/loginget?username='+username+'&password='+password,function(data){
 | 
			
		||||
    $.post('/senddata/loginget','username='+username+'&password='+password,function(data){
 | 
			
		||||
 | 
			
		||||
      console.log(data);
 | 
			
		||||
      if (data.accept == true) {
 | 
			
		||||
        console.log("successfully logged in!");
 | 
			
		||||
        document.cookie = "username="+username; 
 | 
			
		||||
        document.cookie = "username="+username;
 | 
			
		||||
        window.location = 'settings.html';
 | 
			
		||||
      }
 | 
			
		||||
    },'json');
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  $('#signupbtn').click(function(e) {
 | 
			
		||||
    e.preventDefault();
 | 
			
		||||
 | 
			
		||||
    $.post('/senddata/loginpost','username=luki&password=test',function(data){
 | 
			
		||||
      console.log(data);
 | 
			
		||||
    },'json');
 | 
			
		||||
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								wwwroot/js/register.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								wwwroot/js/register.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
$(document).ready(function() {
 | 
			
		||||
  
 | 
			
		||||
});
 | 
			
		||||
		Reference in New Issue
	
	Block a user