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
55
56
57
58
59
60
61
| <html>
<head>
<title>Popup Window - Extended Version</title>
<link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css" />
<script type="text/javascript" src="ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext/ext-all.js"></script>
<script type="text/javascript">
MyWindow = Ext.extend(Ext.Window, {
width: 500,
height: 300,
modal: true,
closeAction: 'hide',
resizable: false,
maximizable: true,
collapsible: true,
draggable: false
});
Ext.onReady(function() {
var win1 = new MyWindow({
title: 'Window 1',
html: '<h2>Window 1</h2>'
});
var win2 = new MyWindow({
title: 'Window 2',
html: '<h2>Window 2</h2>'
});
var win3 = new MyWindow({
title: 'Window 3',
html: '<h2>Window 3</h2>'
});
var button1 = Ext.get('button1');
var button2 = Ext.get('button2');
var button3 = Ext.get('button3');
button1.on('click', function() {
win1.show(this);
});
button2.on('click', function() {
win2.show(this);
});
button3.on('click', function() {
win3.show(this);
});
});
</script>
</head>
<body>
<button id="button1">Show Window 1</button>
<br />
<button id="button2">Show Window 2</button>
<br />
<button id="button3">Show Window 3</button>
</body>
</html>
|