Showing posts with label Disabling browser back button and Calendar. Show all posts
Showing posts with label Disabling browser back button and Calendar. Show all posts

Saturday, 1 March 2014

Disabling browser back button and Calendar

Disabling Browser Back Button Using Following Script 

 <script type="text/javascript" language="javascript">
    window.onload = function () {        noBack();    }    function noBack() {        window.history.forward();    }</script>



Calendar code  using jquery.

 <script src="http://jquery/1.6/jquery.min.js" type="text/javascript"></script>
    <script src="http://jqueryui/1.8/jquery-ui.min.js" type="text/javascript"></script>
    <link href="http://jquery-ui.css" rel="Stylesheet" type="text/css" />
    <script type="text/javascript">
        $(function () {
            $("[id$=txtDate]").datepicker({
                showOn: 'button',
                buttonImageOnly: true,
                buttonImage: 'http://jqueryui.com/datepicker/images/calendar.gif'
            });
        });
    </script>

<body>
    <form id="form1" runat="server">
    <asp:TextBox ID="txtDate" runat="server" ReadOnly = "true"></asp:TextBox>
    <asp:Button ID="btnSubmit" runat="server" Text="Submit" 
        onclick="btnSubmit_Click" />
    </form>
</body>

Calendar code  using   CalendarExtende.

  <cc1:CalendarExtender ID="ToolkitScriptManager" runat="server" PopupButtonID="imgPopup" TargetControlID="txtDate"></cc1:CalendarExtender>
 <td style="width: 100px">
<asp:Label ID="Label12" runat="server" Text=" दिनांक" CssClass="form_lbl" style="position: static"></asp:Label>
</td>
 <td style="width: 100px">
  <asp:TextBox ID="txtDate" runat="server" ReadOnly="true" Width="117px"></asp:TextBox>
  </td>