Ticket #5118: test_Dialog_bug-1.html

File test_Dialog_bug-1.html, 1.3 kB (added by bill, 14 months ago)

add hide() to test case; otherwise problem doesn't reproduce

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2                "http://www.w3.org/TR/html4/strict.dtd">
3<html>
4<head>
5        <title>Dialog Widget Dojo Tests</title>
6        <style type="text/css">
7                @import "dojo/resources/dojo.css";
8                @import "dijit/themes/tundra/tundra.css";
9                @import "css/dijitTests.css";
10                table { border: none; }
11        </style>               
12        <script type="text/javascript"
13                djConfig="parseOnLoad: true, isDebug: true"
14                src="dojo/dojo.js"></script>
15
16        <script type="text/javascript">
17                dojo.require( "dijit.form.Button" );
18                dojo.require( "dijit.Dialog" );
19                dojo.require( "dojo.parser" );  // scan page for widgets and instantiate them
20        </script>
21        <script type="text/javascript">
22                function showDialog()
23                {
24                        var widg = new dijit.Dialog( { title : "Test Dialog", id : "disposable_dlog" } );
25                        widg.setContent( "Hello, world." );
26                        widg.show();
27                        setTimeout( destroyDialog, 2000 );
28                }
29                function destroyDialog()
30                {
31                        var widg = dijit.byId( "disposable_dlog" );
32                        try
33                        {
34                                widg.hide();
35                                widg.destroyRecursive();
36                        }
37                        catch( ex )
38                        {
39                        }
40                }
41        </script>
42        <style type="text/css">
43                body { font-family : sans-serif; }
44        </style>
45</head>
46<body class="tundra">
47<h1 class="testTitle">Avaintec dialog tests</h1>
48    <button dojoType="dijit.form.Button" onclick="showDialog()">Show dialog</button>
49</body>
50</html>