Hi, I am having a similar problem, but changing data.length to data.responseText didn't seem to help.
My map is here: http://www.thegutenberg.com/n0space/markers/phpsqlajax_map_v3.html I also combined two tutorials, which is following the advice at the end of the first tutorial: http://code.google.com/apis/maps/articles/phpsqlinfo_v3.html http://code.google.com/apis/maps/articles/phpsqlajax_v3.html In order to not confuse the two types of info windows, I renamed them so "infowindow" from the first tutorial is "infowindowAdd" everywhere in order to denote this is the info window to add information to the MySQL database. I did the same thing for "downloadUrl" which I changed to "downloadUrlAdd" to keep them separate. I left the other "infoWindow" stuff from the second tutorial intact. The issues I am having are: 1. The info windows look funny. There is some weird spacing issue and the window produces scrollbars instead of conforming to the amount of text to be displayed. Also, the images that make up the window look skewed. (I'm running Chrome and Firefox btw). 2. CRITICAL BUG: When I used the "Save & Close" button running just the first tutorial, the info window actually closed. However, when I combined the two tutorials into my current map, I lost the functionality of closing the info window when you submit data, which permits the user to submit multiple times (which is very bad!). I would love love love if someone could help me at least figure out the second bug. I am having a hard time devising debugging methods. It would be pretty awful to get many redundant submissions! Thanks, Matt On Nov 2, 9:54 pm, gh0st <[email protected]> wrote: > Worked, gotcha! Replaced data.length with data.responseText like you > said. > > On Nov 2, 11:28 am, Chad Killingsworth > > > > > > > > <[email protected]> wrote: > > In your download url callback at line 109, you are using the data > > parameter incorrectly. It is an XmlHttpRequest object. If you want the > > text the ajax call returned, you'll need to check data.responseText. > > data.length is not a valid property. > > > Your call to address.php isn't returning anything either. I'm not sure > > what you are expecting, but an empty string probably isn't it. > > > Chad Killingsworth > > > On Nov 2, 1:16 pm, whereschp <[email protected]> wrote: > > > > bump > > > > On Oct 25, 5:59 pm, gh0st <[email protected]> wrote: > > > > > Ok here's the deal. I'm using two different tutorials to get my > > > > desired outcome but the tutorials have conflicting functions. > > > > I want to allow user submitted data for saving placemarkers so I > > > > followed this > > > > tutorial:http://code.google.com/apis/maps/articles/phpsqlinfo_v3.html > > > > And I want to fetch those user submitted markers from the sql table > > > > and display so I followed this > > > > tutorial:http://code.google.com/apis/maps/articles/phpsqlajax_v3.html > > > > > The downloadUrl functions on each tutorial vary only slightly when the > > > > call callback. > > > > function from saving placemarkers tut: callback(request.responseText, > > > > request.status); > > > > function from fetching placemarkers tut: callback(request, > > > > request.status); > > > > > When I put the desired callback function in the page for what I want > > > > to do, say saving a placemarker, the function call works. It completes > > > > the function call and closes theinfowindowbut it does not display > > > > markers already saved in the sql table. > > > > When I put the callback for fetching placemarkers it doesn't allow me > > > > tosaveplacemarkers but displays all the markers already saved in the > > > > sql table. > > > > > I can paste all my code again if necessary. > > > > > On Oct 16, 2:46 am, Rossko <[email protected]> wrote: > > > > > > > > >www.whereschp.com/new/index.php?p=mainmap > > > > > > My browser reports a javascript error in saveData() > > > > > location = new google.maps.marker.getLatLng(); > > > > > Why would you want to be creating a new marker at that point? > > > > > > The example at > > > > > http://code.google.com/apis/maps/articles/phpsqlinfo_v3.html > > > > > reads a latlng from an existing marker > > > > > var latlng = marker.getPosition(); -- 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.
