atom feed7 messages in[iGoogle Developer Forum] Re: gadgets...
FromSent OnAttachments
KevinSep 22, 2010 1:58 pm 
KevinSep 23, 2010 5:14 am 
Rob RussellSep 28, 2010 1:37 pm 
KevinSep 29, 2010 1:08 pm 
KevinOct 1, 2010 5:00 am 
Rob RussellOct 1, 2010 3:07 pm 
KevinOct 6, 2010 12:24 pm 
Subject:[iGoogle Developer Forum] Re: is undefined
From:Kevin (
Date:Sep 29, 2010 1:08:41 pm

I've figured out how to get my gadget into an iGoogle page by adding it via the "My Gadgets" gadget and it gets past the methods (but not in the GGE Preview pane). It now fails in the callback function when I try to access the makeRequest argument. The error just says "undefined" when I try to do something with in the following code. Any suggestions?

<?xml version="1.0" encoding="UTF-8"?> <Module> <ModulePrefs title="Tester, the Gadget" title_url="" description="Simple gadget to look up mutual fund data on fundAlarm" author="Kevin" /> <Content type="html"><![CDATA[ <script type="text/javascript">

function makeDOMRequest() { var url = ""; var params = []; var userdata = {"ticker1" : document.getElementsByName("ticker1") [0].value}; try { var postdata =; alert("Submitted: "+postdata); params[]= postdata; params[] =; params[] =;, response, params); } catch(err) { alert("makeDOMrequest(): "": "+err.message); } }

function response(obj) { alert("In response()"); try { alert("About to try"); var funddata =; alert(funddata); var tabledata ="table"); var fundname = tabledata[1].rows[0].cells[0].innerHTML; alert("Fund: "+fundname); document.write("<br/><b>Fund: </b>", fundname, "<br/>"); //add more code when this is working... } catch(err) { alert("response(): "": "+err.message); } } </script>

<div> <CENTER>Enter a mutual fund symbol:<br/> <input type="text" maxlength=5 size=6 name="ticker1" /> <input type="button" value="Go" onclick="makeDOMRequest();" /> </CENTER> </div> <p>Testing xxx...</p> ]]></Content> </Module>

On Sep 28, 4:37 pm, Rob Russell <> wrote:

I've seen similar problems when the Javascript starts to run before all resources are finished loading. Try starting your Javascript from an onload handler.

On Thu, Sep 23, 2010 at 5:14 AM, Kevin <> wrote:

More details:  The HTML renders OK in the GGE Preview pane.  The javascript error occurs when I click a button that calls a javascript function that uses several methods and fields.

One other question about GGE: the preview tab puts all the html in a small dashed-line box that significantly restricts the real estate. What is up with that?  I can't seem to adjust it by setting the modulePrefs height and width.

On Sep 22, 4:58 pm, Kevin <> wrote:

Trying to create my first gadget using Google Gadget Editor in FF 3.6.8.  Tried to use the method per the Gadgets API Reference ( reference/) and the error console only says " is undefined".  No other errors.  What am I doing wrong?