Whoops missed the first this

 function showAddress() {
    document.getElementById("map").style.display = 'block'
    var address1= document.form.address1.value
    var address2= document.form.address2.value
    var address = address1+address2

      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert(address + " Address not found");
            } else {
              map.setCenter(point, 16);
              var marker = new GMarker(point);
              map.addOverlay(marker);/*
              marker.openInfoWindowHtml(address);*/
            }
          }
        );
      }
    }

On May 31, 9:58 am, Jabba <[email protected]> wrote:
> Not telling you to suck eggs here, but here is what i think should be
> happening.
>
> $("form").bind("submit", function()   /* on submit run this function
> (jquery framework on this page)*/
> {
>  var name = document.form.name.value;     /* Get form data*/
>  var phone = document.form.phone.value;
>  var address1 = document.form.address1.value;
>  var address2 = document.form.address2.value;
>  var address = address1 + address2;
>
> geocoder = new GClientGeocoder(); /* set up geocoder*/
> if (geocoder) {
>         geocoder.getLatLng(
>           address,
>           function(point) {
>             if (!point) { /* check for a point */
>                 alert("no point"); */ as a test alert this message,
> this seems to work fine if I enter no address*/
>                             }
>                             else
>                             {
>                         $.post("backend.php", */ Jquery post the
> following*/
>                         {
>                         name: name,
>                         phone: phone,
>                         address1: address1,
>                         address2: address2,
>                         latlong: point,
>                         method: "newFood"
>                         },
>                         function(data,textstatus){   */ JSON response
> message from jquery POST
>                         alert(data.message);
>                         if (data.refresh == "true")
>                         {
>                         window.location = "http://p1.dpn.homeip.net/
> content/results.php?
> id=<?echo $sort2?>"
>                         }
>                                                  }, "json"
>      );
>                            }return false; */ thinking this might be in
> the wrong place but is consistent with my script that does not have
> geocode*/
>
>                               }
>                                     );
>              }
>
> });
>
> Im newish a javascript and this is a mashup between this...
>
> Which works happily by itself, but Idon't want a map
>
> and this...
>
> $(document).ready(function(){
>
> $("form").bind("submit", function() {
>         {
>         var login = document.form.login.value;
>         var password = document.form.password.value;
>         var confirm = document.form.confirm.value;
>         var fname = document.form.fname.value;
>         var lname = document.form.lname.value;
>         var email = document.form.email.value;
>         $.post("backend.php", {
>                                 login: login,
>                                 password: password,
>                                 confirm: confirm,
>                                 fname: fname,
>                                 lname: lname,
>                                 email: email,
>                                 method: "register"
>                                  },
>                                 function(data,textstatus){
>                                 alert(data.message);
>                                 if (data.refresh == "true")
>                                 {
>                                 window.location = 
> "http://p1.dpn.homeip.net/content/login.php";
>                                 }
>                                 }, "json");
>                                 }
>                     return false;        });
>                     });
> </script>
>
> which aside from different fields also works fine by itself.
>
> I could post a link but you need to register on the site to gain
> access etc etc also only works on safari as uses webkit. I figure this
> might be a n00b error that might seem a bit more obviouse to the
> trained eye.
>
> Cheers,
>
> Jason
>
> On May 31, 9:32 am, Rossko <[email protected]> wrote:
>
> > On May 30, 10:20 pm, Jabba <[email protected]> wrote:
>
> > > That makes perfect sense, I tried this but I think Im missing
> > > something....
>
> > This, perhaps -
> >  http://groups.google.com/group/Google-Maps-API/web/why-including-a-li...
>
> > and some description of what you expect to happen, or what happens
> > that you weren't expecting etc.
>
> > At the least in your snippet, 'point' is a javascript object - will
> > posting that off to PHP work?
>
> > cheers, Ross K
--~--~---------~--~----~------------~-------~--~----~
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