Hi, I would like to know if the php code for this script needs to be adjusted in anyway to correctly display the output. I'm having trouble running a very similar procedure. -Eric
On Feb 22, 4:21 pm, imoracle <[EMAIL PROTECTED]> wrote: > Hi Kurrik, > > I have been working on javascript for a few months now and have used > the setTimeout() on several occasions. However I can't make that work > for my orkut application, without which my application will be of no > use to users. > > Here is the javascript .js file i am using : > > <script language="javascript"> > var polltime = 1000; > > function makeNormalRequest() { > var params = {}; > params[gadgets.io.RequestParameters.CONTENT_TYPE] = > gadgets.io.ContentType.TEXT; > var url = "http://mysite.com/getdata.php";gadgets.io.makeRequest(url, > response, params); > > }; > > function response(obj) { > //obj.text contains the text of the page that was requested > output(obj.text); > > }; > > function onClickofButton() { > show(document.getElementById('scriptlocationocation').value); > document.getElementById('scriptlocation').value = ""; > document.getElementById('description').style.display = "none"; > document.getElementById('descriptionheader').innerHTML = "<b>Current > status:</b>"; > document.getElementById('output').style.height = "260"; > setTimeout("makeNormalRequest()",polltime);} > > </script> > > Can you please have a look and tell me if I am committing any mistake > somewhere ?? > > On Feb 22, 11:52 pm, "Arne Roomann-Kurrik" <[EMAIL PROTECTED]> > wrote: > > > > > That should be <Require feature="dynamic-height" />. > > > imoracle: There should be plenty of examples of calling a function every X > > seconds in JavaScript if you google for them. Just wrap the makeRequest > > calls in a function that is called by setInterval() or setTimeout() > > > ~Arne > > > On Fri, Feb 22, 2008 at 4:26 AM, Tiago Takamoto <[EMAIL PROTECTED]> > > wrote: > > > > Hi imoracle, > > > > Did you include the <Require feature="window" /> in your xml? > > > > Regards, > > > > Takamoto > > > > On Fri, Feb 22, 2008 at 7:01 AM, imoracle <[EMAIL PROTECTED]> > > > wrote: > > > > > Thanx Arne, its working great but I couldn't find an example where I > > > > can keep polling the remote server every 1 sec or so. > > > > > I tried using the setTimeout() function of javascript too and that > > > > doesnt seems to be working, any idea how can I go abt it. > > > > > And even though i have included the js from coderunner, I am getting > > > > the following error: > > > > > gadgets.window has no property: > > > > gadgets.window.adjustHeight(); > > > > > in my firebug. > > > > > On Feb 22, 12:24 pm, imoracle <[EMAIL PROTECTED]> wrote: > > > > > Thanx a lot Arne.....will have a look and come back in case of any > > > > > problem :) > > > > > > On Feb 22, 12:15 am, "Arne Roomann-Kurrik" <[EMAIL PROTECTED]> > > > > > wrote: > > > > > > > HI imoracle, > > > > > > > opensocial.makeRequest moved togadgets.io.makeRequestin version > > > > 0.7 > > > > > > > You can check out this > > > > pagehttp://code.google.com/p/opensocial-resources/wiki/GadgetsMakeRequest... > > > > > > some samples on how to use this function. > > > > > > > ~Arne > > > > > > > On Thu, Feb 21, 2008 at 11:04 AM, imoracle < > > > > [EMAIL PROTECTED]> > > > > > > wrote: > > > > > > > > <?xml version="1.0" encoding="UTF-8" ?> > > > > > > > <Module> > > > > > > > <ModulePrefs title="Fetch"> > > > > > > > <Require feature="opensocial-0.7"/> > > > > > > > </ModulePrefs> > > > > > > > <Content type="html"> > > > > > > > <![CDATA[ > > > > > > > <div id="content_div"></div> > > > > > > > <script type="text/javascript"> > > > > > > > opensocial.makeRequest("http://www.google.com", > > > > > > > function(response) { > > > > > > > var html = response.substr(0,400); > > > > > > > document.getElementById('content_div').innerHTML = html; > > > > > > > }, {'method' : 'GET', 'contentType' : 'html'}); > > > > > > > </script> > > > > > > > ]]> > > > > > > > </Content> > > > > > > > </Module> > > > > > > > > Gives and error, opensocial.makeRequest doesn't exist. > > > > > > > > Any suggestions?? > > > > -- > > > Takamoto- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Orkut Developer Forum" group. To post to this group, send email to opensocial-orkut@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---