Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="alert alert-danger" id="errorBox" style="display:none; padding:15px;">
- </div>
- <script type="text/javascript">
- $(document).ready(function () {
- $('#signIn').submit(function (e) {
- if ($('#tbxUsername').val().length == 0) {
- $('#errorBox').html('<strong>Error:</strong> You need to enter your username!');
- $('#errorBox').hide().show('shake');
- return false;
- } else if ($('#tbxPassword').val().length == 0) {
- $('#errorBox').html('<strong>Error:</strong> You need to enter your password!');
- $('#errorBox').hide().show('shake');
- return false;
- }
- });
- });
- </script>
Add Comment
Please, Sign In to add comment