I previously posted “getting started” in Feburary and am following up
on that topic.  I am using the “Pinpoint an address” page that both
Rossko and Andrew Leach referred  me to (http://maps.huge.info/
pinpointaddress.htm) to display a Google Map.  Thank you very much for
providing this; it saves me a lot of work.  I have figured out how to
extract the latitude or longitude value from the javascript and how to
put the value into a form field.  I intend to send the values to my
php script using a form with hidden fields.

I have inserted the following line into function newpoint:

document.getElementById("lat").value =
addrpnt.getPoint().lat().toFixed(6);

And then I have added a second form to the html, after the div
containing the statement, “If the resulting marker doesn't represent
the address entered, drag the marker to the correct location.”  Here
is my form at present:

<form>
<form action="temp.php" method="POST">
<input type="text" name="lat" id="lat" value="lat will go here" />
<p> Once the map is showing the right location, click the submit
button. </p>
        <p><input type="submit" value="SUBMIT"/></p>
</form>

The input type will be changed to hidden once I get it working, and,
of course, I will add the longitude value.  My temp.php script is
written simply to echo out the value of lat.

The form works; ie, the latitude value appears in the lat field on the
screen (if I drag the marker).  However, when I click on SUBMIT,
instead of going to my temp.php document, the Google map page
reappears on the screen.  It rather appears as if, instead of doing
the action specified in the second form, it is going back and
activating the onsubmit="showAddress(this.address.value) of the first
form.  However, when I tried commenting out the first form after
getting to the point where I am ready to submit the second one, it
still did the same thing, so apparently this hypothesis isn’t
correct.  Does anyone have any idea why I can’t get the form to submit
to the php page?

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