Source code of tbs_us_examples_event.htm

  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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
 
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>TinyButStrong - Example of event function</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="./tbs_us_examples_styles.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.cell-1 {
    background-color:#F0F0F0;
}
.cell-2 {
    background-color:#E6E6E6;
}
.cell-header {
    background-color:#CACACA;
    font-weight:bold;
}
</style>
</head>
<body>
<div id="main-body">
  <h1>Example of event function</h1>
  <div class="w3cinfo"> this TBS template is W3C compliant <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml11" alt="Valid XHTML 1.1" height="31" width="88" style="border:none;" /></a> </div>
  <div id="example">
    <p>Parameters <samp>onformat</samp> and <samp>ondata</samp> allow to execute an event function each time a field or a block is merged.</p>
    <p>In this example, the parameter ondata is used to display a colored comment using the <samp>m_event_b1()</samp> function.</p>
    <table border="1" cellpadding="3" cellspacing="0" style="margin-left:auto; margin-right:auto;">
      <tr class="cell-header">
        <th>Position</th>
        <th>Nickname</th>
        <th>Score</th>
        <th>Level</th>
        <th>Date</th>
      </tr>
      <tr class="cell-1">
        <td>[b1.#]</td>
        <td>[b1.res_name;block=tr; ondata=m_event_b1]</td>
        <td align="center">[b1.res_score]</td>
        <td align="center">[b1.level; htmlconv=no]</td>
        <td align="center">[b1.res_date; frm='dd/mm/yy']</td>
      </tr>
      <tr class="cell-2">
        <td>[b1.#]</td>
        <td>[b1.res_name;block=tr; ondata=m_event_b1]</td>
        <td align="center">[b1.res_score]</td>
        <td align="center">[b1.level; htmlconv=no]</td>
        <td align="center">[b1.res_date ;frm='dd/mm/yy']</td>
      </tr>
    </table>
  </div>
</div>
</body>
</html>