Thursday, 20 March 2014

Page navigation in javascript

In your application you have many page and in some condition you need to redirect form one page to another page through JavaScript code [Page navigation]


@Code Snippet for navigation of Javascript:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Page Navigation </title>
    <script type="text/javascript">
        function Open() {
            window.location = 'http://www.google.co.in'; // open the page in diffrent location
          //  window.location.href = 'Default2.aspx';  open the page in same application location
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
  
        <input type="button" value="Navigate to a URL" onclick="Open();" />
    </form>
</body>
</html>

No comments:

Post a Comment

Others

You will like to read it