On Feb 20, 1:22 pm, Jee <[email protected]> wrote:
> Here's my code, simple enough:

Please don't post code. Please post a link as the Posting Guidelines
ask.

> It runs fine and updates all DIVs w/ accurate distances, but the
> Browser consistently gives a gdir140.getDistance().html is null or not
> an object error on line 38, which is the "  document.getElementById
> ('225').innerHTML=gdir225.getDistance().html;" line in my handleLoad
> function.

You're using the same function for all your directions calls. That
means that results which aren't available every time it's run will
cause it to crash. When the first call returns, the function tries to
use gdir140.getDistance().html whether gdir140.getDistance() can
return anything or not.

At least, that's my guess. A link would enable real debugging. If I'm
right then lines like
  if (gdir2.getDistance().html) { document.getElementById
('2').innerHTML=gdir2.getDistance().html; }
should allow the function to work no matter what order the results
returned.

By the way, if you're relying on IE's error messages, line numbers are
always wrong.

Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to