Monday 15 September 2014

javascript works in debugger but not in run mode -


I am using google.api to validate the address and then know that the address is valid if the database is in Call an AJAX call to insert But Google code is executed later ((Latty === Undefined) & amp; amp; (Long === Undefined) where its address is invalid. Could some please suggest that before google.map is not executed before it essentially fetches and checks for long

  $ (document) .ready (function () {var geocoder = new google.maps.Geocoder (), lettie, longie; $ ("# editDistributor") dialog ({autoOpen: ("$" ("#distAddress") .val ()) {tempAddress = $ ("#distAddress"): wrong, height: 550, width: 550, model: right, button: {"save": function () {If ($ ("$ distAddress"). Val ();} ($ ("$ (" #distCity ") .val ()) tempAddress = tempAddress + $ (" #distCity ") .val (); if ($ ( "#distState") .val ()) tempAddress Val ()) = tempAddress + $ ("#distState") .val (); if ($ ("# distZip"). Val ()) tempAddress = tempAddress + $ ( "# DistZip"). Val (); geocoder.geocode ({'address': tempAddress}, function (result, position) {if (condition) {google.maps.GeocoderStatus.OK: lati = results [0] .geometry .location.k; longi = Result [0] .geometry.location; D;}}); if (( Retrieval === Undefined) & amp; amp; (Long === Undefined) {Warning ("Invalid Address");} and {var Dialogues = $ (this); Var Map Resources = New Object (); If ($ ("#distCompany") .val ()! = Undefined) {mapContent.name = $ ("#distCompany") .val (); } And {warnings ("Please enter the company name"); } $ .jax ({type: "POST", url: window.location.origin + "/" + window.location.pathname.split ("/") [1] + "/ map / create", data: JSON Successfully: Action (response) {alert ("yes");}, error: function () {warning ("(HTML)", "html", data type: "html", contentType: 'application / json; charset = Utf-8 'failure');}}};}}, close: function () {$ (this) .dialog ("closed");}}})  

Thanks


No comments:

Post a Comment