Hi.

I tend to use something like this when i need to wait for an element
to exist in the DOM before i can manipulate it:

function waitForDOM(){
 if(document.getElementById('myDiv')){
  // do something with the div
 } else {
  setTimeout(waitForDOM, 250);
 }
}

// start it going
waitForDOM();

Martin.


On Jun 23, 12:00 pm, RoyHB <[email protected]> wrote:
> Thanks Pil.
>
> The page I posted is just to demonstrate the issue.  In the actual
> application there are several places where large and complex bits of html
> are used within objects.  For the production world I build the html into
> files that I include via php pre-processing.  I've just found it easier to
> maintain these files as text rather than as strings.  When I load them I do
> so via statements like:
>
> var myHTML = '<?php $myHtmlFile = fopen("Logo_HTML.txt","r");$logoHTML =
> fread($myHtmlFile , filesize("Logo_HTML.txt"));echo $logoHTML?>';
>
> I'll try to add something to the demo that will allow me to trigger the
> attempt to access LatLonTxt after the page has finished loading and see it
> that works.
>
> Cheers;
> Roy

-- 
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.

Reply via email to