Rossko, thanks so much for your help, I knew it was something obvious like that but I couldn't focus on the problem. I posted the functioning (fixed) site if anyone is curious how it works.
http://galacticstatic.net/directionstest.html On Jul 26, 6:39 pm, Rossko <[email protected]> wrote: > > I have everything working great when the <input> form is not located > > in the info window (or in the "map_container" div that hosts the > > google map). However when the input form is located inside the <div > > id="map-container"> that holds the map, the Javascript does not seem > > to be able to getElementById and retrieve the "from:" value. > > Bear in mind the content of the infowindow has no existence in the > browser's DOM until AFTER the infowindow has been opened. The > content is just a string of characters in a javascript variable until > then. > > Your code > var Trails = { > fromInput: document.getElementById('from-input'), > is executed before the element exists. > > I'd just use document.getElementById() at Directions set up time. -- 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.
