summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Controls/JavascriptLogger.page
blob: c8b553bd3613e7d36216cc7e5254a6cf53685e2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<com:TContent ID="body" >

<h1 id="3401">TJavascriptLogger</h1>
<com:DocLink ClassPath="System.Web.UI.WebControls.TJavascriptLogger" />

<p id="390277" class="block-content">
<tt>TJavascriptLogger</tt> provides logging for client-side javascript. It is mainly a wrapper of the Javascript developed at <a href="http://web.archive.org/web/20060512041505/gleepglop.com/javascripts/logger/">http://gleepglop.com/javascripts/logger/</a>.
</p>

<p id="390278" class="block-content">
To use <tt>TJavascriptLogger</tt>, simply place the following component tag in a page template.
</p>
<com:TTextHighlighter Language="prado" CssClass="source block-content" id="code_390107">
&lt;com:TJavascriptLogger /&gt;
</com:TTextHighlighter>

<p id="390279" class="block-content">
Then, the client-side Javascript may contain the following statements. When they are executed, they will appear in the logger window.
</p>
<com:TTextHighlighter Language="js" CssClass="source block-content" id="code_390108">
Logger.info('something happend');
Logger.warn('A warning');
Logger.error('This is an error');
Logger.debug('debug information');
</com:TTextHighlighter>

<p id="390280" class="block-content">
To toggle the visibility of the logger and console on the browser window, press ALT-D (or CTRL-D on OS X).
</p>

</com:TContent>