Nitin's right. Of course, you can always inspect the response by
firing up a tool like Firebug also. :)

- Jason

On Jun 4, 10:47 pm, "Nitin Mittal" <[EMAIL PROTECTED]> wrote:
> I guess you are missing a html element with id='content_div', add the
> following after your javascript and then try:
> <div id="content_div"></div>
>
> -Nitinwww.shopndshout.com
> (flaunt ur shopping)
>
> On Thu, Jun 5, 2008 at 1:11 AM, Vinicius <[EMAIL PROTECTED]> wrote:
>
> > I am trying to test this code, but does not return anything, what is
> > happening?
>
> > <?xml version="1.0" encoding="UTF-8" ?>
> > <Module>
> >  <ModulePrefs title="Fetch Content as Text">
> >    <Require feature="opensocial-0.7"/>
> >  </ModulePrefs>
> >  <Content type="html">
> >  <![CDATA[
> >    <div id="content_div"></div>
> >    <script type="text/javascript">
>
> >    function makeNormalRequest() {
> >      var params = {};
> >      params[gadgets.io.RequestParameters.CONTENT_TYPE] =
> > gadgets.io.ContentType.TEXT;
> >      var url = "http://www.google.com";;
> >      gadgets.io.makeRequest(url, response, params);
> >    };
>
> >    function response(obj) {
> >      //obj.text contains the text of the page that was requested
> >      var str = obj.text;
> >      var html =  str.substr(0,400);
> >      document.getElementById('content_div').innerHTML = html;
> >    };
>
> >    makeNormalRequest();
> >    </script>
> >  ]]>
> >  </Content>
> > </Module>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" 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/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to