When you use this code in an xml file, you need to change the line:
output(data.text)

to set the content of a div element in your page:
document.getElementById('main').innerHTML = data.text

See the complete example which converts your code into an xml file:

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
        <ModulePrefs title="MakeRequest API sample" author="Vijaya
Machavolu">
                <Require feature="opensocial-0.8"/>
        </ModulePrefs>
        <Content>
        <![CDATA[
        <script type="text/javascript">
                        function response(data) {
                                document.getElementById('main').innerHTML = 
data.text;
                        };

                        function request() {
                                gadgets.io.makeRequest('http://www.google.com', 
response);
                        };

                        request();
        </script>
        <div id="main" />
        ]]>
</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