On Aug 22, 1:15 pm, David van der Tuijn <[email protected]> wrote: > I created a Callback function (MyCallback), but i recieve the > following error in the firefox console : data2 is not defined.
Without looking, I suspect that is because data2 is not defined. Why do you think it is defined where you use it? > > http://www.tfalcon.nl/google/test.html After looking at your page, I see the problem. The error is being reported on this line (where data2 is not defined): downloadUrl("user.php?id=" + id, MyCallback(data2)); the second argument to downloadUrl is supposed to be a function pointer, which can't take arguments: downloadUrl("user.php?id=" + id, MyCallback); When you use the original syntax, it executes the MyCallback function and uses the returned value (null), as the function. -- Larry -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" 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/google-maps-js-api-v3?hl=en.
