Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- $("#buttonLogin").click(function() {
- var action = $("#formLogin").attr('action');
- var form_data = {
- username: $("#login").val(),
- password: $("#password").val(),
- is_ajax: 1
- };
- $.ajax({
- type: "POST",
- url: action,
- data: form_data,
- success: function(response)
- {
- if(response == 'success'){
- $("#message").html("<p class='success'>Você foi logado com êxito!</p>");
- }else{
- $("#message").html("<p class='error'>Nome de usuário/senha inválido.</p>");
- }
- }
- });
- return false;
- });
- });
Add Comment
Please, Sign In to add comment