Finish project. Please read the readme.

Signed-off-by: Rick Hays <rhays@haysgang.com>
This commit is contained in:
2019-09-25 21:07:14 -05:00
parent 1c2488c808
commit ec443db999
8 changed files with 183 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
let value_error = false; // Flag if Lat/Lon values are out of range.
let latitude_low = 38.0;
let latitude_high = 40.0;
let longitude_low = -96.0;
let longitude_low = -97.0;
let longitude_high = -94.0;
function submitForm()
@@ -29,9 +29,26 @@ function submitForm()
// if Lat or Lon values are out of range return to form.
if (value_error) { return; }
// Call to API
$.ajax(
{
url : 'https://rhays.us/Examples/RX_API_Call/RX.php',
type : 'GET',
dataType: 'html',
data :
{
'K' : 'RLH1234',
'Latitude' : nLatitude,
'Longitude' : nLongitude
},
success : function(data)
{
$("#results").html(data);
},
error : function(request,error)
{
alert("Request: "+JSON.stringify(request));
}
});
alert('Submit Form');
}