Nextrek
Diff Revisions
803
vs
804
for /Web/Smartcharging_site/js/formcheck.js
|
@@ -403,18 +403,24 @@ |
403 |
403 |
|
//$(".map-search-heading").after('<input id="address" type="hidden" class="form-control" value="'+AddressName+'" required=""><input id="lat" type="hidden" class="form-control" value="'+lat+'" required=""><input id="lon" type="hidden" class="form-control" value="'+lng+'" required="">'); |
404 |
404 |
|
//} |
405 |
405 |
|
|
|
406 |
+ |
|
406 |
407 |
|
function setInfoAddress(AddressName, lat, lng){ |
407 |
|
- |
window.addressNemaVal = AddressName; |
|
408 |
+ |
/*window.addressNemaVal = AddressName; |
408 |
409 |
|
window.latVal = lat; |
409 |
|
- |
window.lngVal = lng; |
|
410 |
+ |
window.lngVal = lng;*/ |
|
411 |
+ |
window.parent.addressDataGlobal = []; |
|
412 |
+ |
window.parent.addressDataGlobal.push(AddressName); |
|
413 |
+ |
window.parent.addressDataGlobal.push(lat); |
|
414 |
+ |
window.parent.addressDataGlobal.push(lng); |
410 |
415 |
|
} |
411 |
416 |
|
|
412 |
417 |
|
function getAddressData(){ |
413 |
|
- |
var addressData = []; |
|
418 |
+ |
/*var addressData = []; |
414 |
419 |
|
addressData.push(window.addressNemaVal); |
415 |
420 |
|
addressData.push(window.latVal); |
416 |
|
- |
addressData.push(window.lngVal); |
417 |
|
- |
return addressData; |
|
421 |
+ |
addressData.push(window.lngVal);*/ |
|
422 |
+ |
|
|
423 |
+ |
return window.addressDataGlobal; |
418 |
424 |
|
} |
419 |
425 |
|
|
420 |
426 |
|
|
|
@@ -462,7 +468,8 @@ |
462 |
468 |
|
var dataAddressInfo = getAddressData(); |
463 |
469 |
|
|
464 |
470 |
|
form = jQuery(this); |
465 |
|
- |
form.append('<input id="address" type="hidden" value="'+dataAddressInfo[0]+'" ><input id="lat" type="hidden" value="'+dataAddressInfo[1]+'" ><input id="lon" type="hidden" value="'+dataAddressInfo[2]+'">'); |
|
471 |
+ |
form.find("#address, #lon, #lat").remove(); |
|
472 |
+ |
form.append('<input id="address" name="address" type="hidden" value="'+dataAddressInfo[0]+'" ><input id="lat" name="lat" type="hidden" value="'+dataAddressInfo[1]+'" ><input id="lon" name="lon" type="hidden" value="'+dataAddressInfo[2]+'">'); |
466 |
473 |
|
send_form('affiliate', form); |
467 |
474 |
|
$(form).hide(); |
468 |
475 |
|
|