source: Dev/branches/rest-dojo-ui/client/dojox/io/tests/scriptFrameRepeat.html @ 256

Last change on this file since 256 was 256, checked in by hendrikvanantwerpen, 13 years ago

Reworked project structure based on REST interaction and Dojo library. As
soon as this is stable, the old jQueryUI branch can be removed (it's
kept for reference).

File size: 1.3 KB
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>Testing repeat dojox.io.scriptFrame calls</title>
6                <style type="text/css">
7                        @import "../../../dojo/resources/dojo.css";
8                </style>
9                <script type="text/javascript"
10                        src="../../../dojo/dojo.js" djConfig="isDebug: true"></script>
11                <script type="text/javascript">
12                        require(['dojo/io/script', 'dojox/io/scriptFrame'], function(script, scriptFrame){
13                                function repeatCall(){
14                                        var td = script.get({
15                                                //Note that this URL path is relative to the URL of the iframe document
16                                                //(dojo.moduleUrl("dojo.resources", "blank.html")
17                                                url: "../tests/io/scriptJsonp.js",
18                                                content: { foo: "bar" },
19                                                callbackParamName: "callback",
20                                                frameDoc: "testFrame",
21                                                timeout: 3000
22                                        });
23                                        td.addBoth(function(res){
24                                                if(!(res instanceof Error) && "mammal" == res.animalType){
25                                                        console.log("success");
26                                                }else{
27                                                        console.error(res);
28                                                }
29                                                return res;
30                                        });
31                                };
32
33                                setInterval(repeatCall, 2000);
34                        });
35                </script>
36        </head>
37        <body>
38                <p>This page tests repeat usage of dojo.io.script.get() with the dojox.io.scriptFrame extensions.</p>
39                <p>Inspect the iframe created by dojox.io.scriptFrame to see if it is performing correctly.</p>
40        </body>
41</html>
Note: See TracBrowser for help on using the repository browser.