1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
\r
4 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
\r
5 <title>Hello World Dialog Example</title>
\r
6 <link rel="stylesheet" type="text/css" href="../../cssX/roojs-all.css"/>
7 <link rel="stylesheet" type="text/css" href="../../cssX/xtheme-slate.css"/>
9 <script type="text/javascript" src="../../roojs-all.js"></script>
11 <script language="javascript" src="hello.js"></script>
\r
13 <!-- Common Styles for the examples -->
\r
14 <link rel="stylesheet" type="text/css" href="../examples.css" />
\r
17 <script type="text/javascript" src="../examples.js"></script><!-- EXAMPLES -->
\r
19 <h1>Hello World Dialog</h1>
\r
20 <p>This example shows how to create a very simple modal BasicDialog with "autoTabs".</p>
\r
21 <input type="button" id="show-dialog-btn" value="Hello World" /><br /><br />
\r
22 <p>Note that the js is not minified so it is readable. See
23 <button type="button" onclick="RooDocs.viewSource.show('/hello.js')">hello.js</button>for the full source code.</p>
\r
24 Here's snapshot of the code that creates the dialog:
\r
25 <pre class="code"><code>dialog = new Roo.BasicDialog("hello-dlg", {
\r
34 dialog.addKeyListener(27, dialog.hide, dialog);
\r
35 dialog.addButton('Close', dialog.hide, dialog);
\r
36 dialog.addButton('Submit', dialog.hide, dialog).disable();
\r
39 <!-- The dialog is created from existing markup.
\r
40 The inline styles just hide it until it created and should be in a stylesheet -->
\r
41 <div id="hello-dlg" style="visibility:hidden;position:absolute;top:0px;">
\r
42 <div class="x-dlg-hd">Hello Dialog</div>
\r
43 <div class="x-dlg-bd">
\r
44 <!-- Auto create tab 1 -->
\r
45 <div class="x-dlg-tab" title="Hello World 1">
\r
46 <!-- Nested "inner-tab" to safely add padding -->
\r
47 <div class="inner-tab">
\r
48 Hello...<br><br><br>
\r
51 <!-- Auto create tab 2 -->
\r
52 <div class="x-dlg-tab" title="Hello World 2">
\r
53 <div class="inner-tab">
\r