1: <%@ Page Language="C#" Title="AtomicButton -- Client side events" AutoEventWireup="true" CodeBehind="ClientSideEvents.aspx.cs"
2: Inherits="Atom.Website.Samples.AtomicButton.ClientSideEvents" %>
3:
4: <%@ Register Src="../Source.ascx" TagName="Source" TagPrefix="sample" %>
5: <%@ Register Assembly="Atom.Web" Namespace="Atom.Web.UI.WebControls" TagPrefix="atom" %>
6: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
7: <html xmlns="http://www.w3.org/1999/xhtml">
8: <head id="Header1" runat="server">
9: <link rel="Shortcut Icon" type="image/ico" href="../images/icon.png" />
10: <!-- The jQuery UI theme that will be used by the components. -->
11: <link href="../themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
12: <!-- jQuery runtime minified -->
13: <script src="../Scripts/jquery-1.9.1.js" type="text/javascript"></script>
14: <!-- jQuery UI runtime minified, client-side javascript of the components.-->
15: <script src="../Scripts/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
16: <!-- This style reference is needed only for the current example. -->
17: <link href="../css/example.css" rel="stylesheet" type="text/css" />
18: <script type="text/javascript">
19:
20: var logContainer;
21:
22: $(document).ready(function () {
23: logContainer = $("#<%= LogContainer.ClientID %>");
24: });
25:
26: function ClearLogContainer() {
27: logContainer.val('');
28: }
29:
30: var clickCount = 0;
31:
32: function OnClientClick() {
33: clickCount++;
34:
35: AtomicButton1.button('option', 'label', "AtomicButton (" + clickCount + ")");
36: logContainer.val(logContainer.val() + '\nClient Click at ' + Date());
37: }
38:
39: </script>
40: </head>
41: <body>
42: <form id="form1" runat="server">
43: <div>
44: <atom:AtomicButton ID="AtomicButton1" runat="server" Text="AtomicButton" OnClientClick="OnClientClick" />
45: </div>
46: <br />
47: <fieldset>
48: <legend>Events</legend>
49: <div>
50: <a href="javascript:void(0);" style="float: right;" onclick="ClearLogContainer()">clear
51: log container</a>
52: <asp:TextBox ID="LogContainer" runat="server" TextMode="MultiLine" Width="100%" Text=""
53: Height="150px"></asp:TextBox>
54: </div>
55: </fieldset>
56: <br />
57: <sample:Source ID="Code" runat="server" />
58: </form>
59: </body>
60: </html>