Finish project. Please read the readme.
Signed-off-by: Rick Hays <rhays@haysgang.com>
This commit is contained in:
27
js/system.js
27
js/system.js
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user