Debian Codegraph @

dojox/rpc/demos/yahoo.html

raw symbols SCIP
1 <html>
2 <head>
3 <title>
4 Yahoo Search Demo
5 </title>
6 <script src="../../../dojo/dojo.js" type="text/javascript"
7 data-dojo-config="parseOnLoad: true, isDebug: true"></script>
8 <script type="text/javascript">
9 dojo.require("dojo.io.script")
10 dojo.require("dojox.rpc.Service");
11 dojo.require("dijit._Widget");
12 dojo.require("dojox.dtl._Templated");
13 dojo.require("dojo.parser");
14
15 dojo.declare("YahooWebSearchApiWidget", [dijit._Widget, dojox.dtl._Templated], {
16 constructor: function(params, node){
17 var mu = dojo.moduleUrl("dojox.rpc.SMDLibrary", "yahoo.smd");
18 this.yahoo = new dojox.rpc.Service(mu);
19 },
20 onSearch: function(e){
21 if(e.keyCode == dojo.keys.ENTER){
22 this.yahoo.webSearch({
23 query: e.target.value
24 }).addCallback(this, function(results){
25 console.debug(results.ResultSet);
26 this.results = results.ResultSet;
27 this.render();
28 });
29 }
30 },
31 templateString: dojo.cache("dojox.rpc.demos.templates", "yahoo.html")
32 });
33 </script>
34 </head>
35 <body>
36 <h1>Yahoo Web Search</h1>
37 <div dojoType="YahooWebSearchApiWidget"></div>
38 </body>
39 </html>