0
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css">
<script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
<style type="text/css">
    .bs-example{
        margin: 20px;
    }
</style>
</head>
<body>
<div class="bs-example">
    <!-- Button HTML (to Trigger Modal) -->
    <a href="#myModal" class="btn btn-lg btn-primary" data-toggle="modal">Login</a>

    <!-- Modal HTML -->
        <div id="myModal" class="modal fade">
        <div class="modal-dialog">
        <div class="modal-content">
        <div class="modal-header">
       <div class="form-feedback" style="display:none;">Login Success</div>
        <form id ="employer_login">
        <div class="form-group">
        <label for="inputEmail">Email</label>
        <input type="text" class="form-control" id="inputEmail" placeholder="Email">
        </div>
        <div class="form-group">
        <label for="inputPassword">Password</label>
        <input type="password" class="form-control" id="inputPassword" placeholder="Password">
        </div>
        <div class="checkbox">
        <label><input type="checkbox"> Remember me</label>
        </div>
        <input type="submit" name="submit" />
        </form>
        </div>
        </div>
        </div>
        </div>
        </div> 


        <!--//// Modal HTML -->
<script>
$(function() {
  $("#employer_login").submit(function(e) {
    e.preventDefault();

    $form = $(this);
    $.post(document.location.href, $form.serialize(), function(response) {
      $feedback = $("<div>").html(response).find(".form-feedback").hide();

      $form.prepend($feedback)[0].reset();
      $feedback.fadeIn();
    });
  });
})
</script>    
</body>
</html>                                                                              
2
Contributors
2
Replies
16
Views
3 Years
Discussion Span
Last Post by Troy III
0

i want it to show success once and dissappear dialog after 2 seconds....

Edited by chaitu11

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.