Adding to what dougx said, robot can listen for BLIP_SUBMITTED event, which get triggered whenever gadget makes a state change.
On Dec 16, 3:41 pm, dougx <[email protected]> wrote: > Otherwise you can listen for DOCUMENT_CHANGED events in your robot and > pull data out of the gadget state. > > ...but here's an example, of using makeRequest(): > (this is a gadget) > > <?xml version="1.0" encoding="UTF-8" ?> > <Module> > <ModulePrefs title="State Example" height="220"> > <Require feature="wave" /> > </ModulePrefs> > <Content type="html"> > <![CDATA[ > <style> > #content_div { > height: 100px; > width: 400px; > border: 2px solid #efefef; > font-family: arial;} > > #msg_div { > height: 80px; > overflow: auto;} > > </style> > <div id="content_div"> > <div id="msg_div"></div> > > <!-- Gadget bootstrap. --> > <script type="text/javascript"> > var obj = { > 'msgs' : document.getElementById('msg_div'), > 'init' : function() { > if (wave && wave.isInWaveContainer()) { > var params = {}; > params[gadgets.io.RequestParameters.CONTENT_TYPE] = > gadgets.io.ContentType.TEXT; > var url = "http://www.google.com"; > var response = function(data) { > obj.msgs.innerHTML = 'cAllback from makerequest: ' + > data.text; > }; > gadgets.io.makeRequest(url, response, params); > } > } > }; > gadgets.util.registerOnLoadHandler(obj.init); > </script> > ]]> > </Content> > </Module> > > ~ > Doug. > > On Dec 16, 4:59 am, Dragon Silicon <[email protected]> wrote: > > > > > Dear Alex, > > > The gadgets are capable of doing simple web requests, via the > > gadgets.io.makerequest call. > > This is pretty much detailed in the wave > > articles<http://code.google.com/apis/wave/articles/gadgetdebugging.html> > > . > > Your bot is most probably a standard web application -that is, it can > > receive web requests. Put these together, and you've got working > > communication. > > As a transport layer, we traditionally stick with JSON, but for simple > > purposes a basic HTTP POST usually do the trick. > > > Good luck > > -SDr > > > On Wed, Dec 16, 2009 at 7:12 AM, hvt_kg <[email protected]> wrote: > > > Hi all, > > > > Now. I want know how to get value of textbox from gadget pass to bot. > > > anyone can help me? example, etc... > > > > thanks all, > > > Alex > > > > -- > > > > You received this message because you are subscribed to the Google Groups > > > "Google Wave API" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]<google-wave-api%2Bunsubscribe@ > > > googlegroups.com> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-wave-api?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en.
