Click here to Skip to main content
15,882,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery.history.js"></script>
</head>
<body>
  <a class="btn btn-primary" data-toggle="modal" href="" data-target="#myModal" onclick="dummyurl()">Click me</a>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-body">
      its modal content
      </div>
      </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<script type="text/javascript">
 var dummyurl = (function (window, undefined) {
    History.pushState(null, null, "?ChangePassword");
});
 </script>
</body>
</html>



After i click button, open modal dialop with dummy url
like forgetpassword.html?ChangePassword

but i need url back to forgetpassword.html
when i close modal dialog box and also click outside modal dialog ,it should back to original url
Posted
Updated 29-Jul-14 22:18pm
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900