Created
June 19, 2012 05:18
-
-
Save gladson/2952424 to your computer and use it in GitHub Desktop.
login.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="text/javascript"> | |
| $(function(){ | |
| $('#enviar_contato').click(function(){ | |
| var id_username = $("#id_username").val(); | |
| var id_password = $("#id_password").val(); | |
| var id_token = $("#id_token").val(); | |
| if (id_username!='' & id_password!='' & id_token!='') | |
| { | |
| $('.loading').show(); | |
| $('form')[0].reset(); | |
| $('#myForm').fadeTo("slow", 0.3); | |
| $.post("/login/",{id_username: id_username, id_password:id_password, id_token:id_token}, | |
| function(retorno){ | |
| $('.loading').fadeOut(); | |
| $('#resposta').html(retorno).fadeIn(); | |
| $('#myForm').fadeTo("slow", 1); | |
| $('#resposta').fadeOut(3000); | |
| }) | |
| }else{ | |
| alert("Existem campos incompletos no formulário. Favor preencher todos."); | |
| } | |
| return false; | |
| }) | |
| }) | |
| </script> | |
| {% endblock js %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment