[Chugalug] Any javascript guru's out there?

Dan Lyke danlyke at flutterby.com
Tue Nov 13 22:25:06 UTC 2012

On Tue, 13 Nov 2012 17:13:15 -0500
Joe Freeman <joe at netbyjoe.com> wrote:
> Inside the ip_callback function, my debug screen pop shows the correct
> output. The screen pop in the onLoad() function, however, doesn't
> show the correct output - it shows all my variable contents as
> "undefined".

Right. What happens is that EasyjQuery_Get_IP("ip_callback","full");
sets up a request that will either complete or not, but then it happily
returns and lets the rest of your onLoad function complete.

If the EasyjQuery_Get_IP("ip_callback","full"); gets valid data, then
it calls ip_callback, but that can happen long after onLoad returns.

So if you have other things you want to do that are dependent on the
data you get from the callback, you want to do them triggered from that
callback, not in the onLoad() function.


More information about the Chugalug mailing list