Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old October 21st, 2008, 07:22 AM
Registered User
Join Date: Oct 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Update Google Map API Markers

i'm trying to figure out how to update a map marker for the Google Maps API. i took existing code that works correctly and tried to apply it to my solution but i haven't been able to get it to work... here is the code that works to store new markers (slightly abbreviated)...

function storeMarker() {
    var getVars = "?species=" + document.getElementById("species").value        
        + "&lat=" + lat;

    var request = GXmlHttp.create();

    //open the request to storeMarker.php on your server
    request.open('GET', 'storeMarker.php' + getVars, true);
    request.onreadystatechange = function() {
        if (request.readyState == 4) {
    return false;
for my solution, i have the following function that is triggered by this code...

<form name="MarkerForm" onSubmit="return updateMarker()">

all of the fields are inside the form and i have confirmed the URL string is formatted correctly with the alert(); below. the updateMarker.php page has been tested independently and works correctly, but when i try to update a marker from the map API it does not update the form data or database record and does not give me any errors. any suggestions? thanks!

function updateMarker() {
        var getData = "?species=" + document.getElementById("species").value
                 + "&lat=" + lat;

    //alert('updateMarker.php' + getData); <-- this has confirmed the URL string is formatted correctly

    var request = GXmlHttp.create();
    request.open('GET', 'updateMarker.php' + getData, true);

    return false;
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
google map clicked coordinates neon20 Javascript 4 June 18th, 2008 07:32 AM
Heat Map over Google Map ajit Javascript 0 March 7th, 2008 08:01 AM
google map GetDirections problem mrjoka Javascript How-To 0 October 4th, 2007 09:08 AM
Change Series Color in Stacked Line Markers chart Jell Pro VB.NET 2002/2003 0 July 13th, 2005 06:42 AM

All times are GMT -4. The time now is 01:37 PM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.