r19141: add a reasonable subset of the qooxdoo runtime environment, and example appli...
[Samba/ekacnet.git] / swat / apps / qooxdoo-examples / example / Iframe_1.html
blob90d87e1d9b44cba83fdbb74f12fc4603a97daf4e
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4 <title>qooxdoo &raquo; Demo</title>
5 <link type="text/css" rel="stylesheet" href="../../resource/css/layout.css"/>
6 <!--[if IE]>
7 <link type="text/css" rel="stylesheet" href="../../resource/css/layout_ie.css"/>
8 <![endif]-->
9 <script type="text/javascript" src="../../script/qx.js"></script>
10 </head>
11 <body>
12 <script type="text/javascript" src="../../script/layout.js"></script>
14 <div id="demoDescription">
15 <p>Iframe implementation. Elastic.</p>
16 </div>
18 <script type="text/javascript">
19 qx.core.Init.getInstance().defineMain(function()
21 var d = qx.ui.core.ClientDocument.getInstance();
23 //----------
24 // qx.ui.embed.Iframe
25 //----------
27 w1 = new qx.ui.embed.Iframe();
29 w1.addEventListener("load", function(e) {
30 this.debug("Loaded: " + this.getSource());
31 });
33 // elastic
34 w1.set( { left: 20, top: 96, right: 335, bottom: 48 } );
35 w1.setSource("http://www.google.com");
37 d.add(w1);
40 function changeURL(e) {
42 this.setSource(e.getData());
45 // make qx.ui.embed.Iframe react to event "surfTo" via function changeURL()
46 d.addEventListener("surfTo", changeURL, w1);
49 //-------------
50 // radio group
51 //-------------
53 var rd1 = new qx.ui.form.RadioButton("Google", "http://www.google.com");
54 var rd2 = new qx.ui.form.RadioButton("Yahoo", "http://www.yahoo.com");
56 rd1.set( { left: 20, top: 48, checked: true } );
57 rd2.set( { left: 120, top: 48 } );
59 var rbm = new qx.manager.selection.RadioManager( name, [rd1, rd2]);
61 // elements of radio group fire event "surfTo"
62 rbm.addEventListener("changeSelected", function(e)
64 d.dispatchEvent( new qx.event.type.DataEvent("surfTo", e.getData().getValue() ) );
65 });
67 d.add(rd1, rd2);
68 });
69 </script>
70 </body>
71 </html>