From aaeb20aece90a8889f234f4497395f000b95b207 Mon Sep 17 00:00:00 2001 From: PaulVua Date: Mon, 3 Feb 2025 10:50:03 +0100 Subject: [PATCH] update --- html/saraR4.html | 9 +++++++++ html/sensors.html | 3 +++ 2 files changed, 12 insertions(+) diff --git a/html/saraR4.html b/html/saraR4.html index fd1940d..75afe68 100755 --- a/html/saraR4.html +++ b/html/saraR4.html @@ -312,6 +312,7 @@ function getData_saraR4(port, command, timeout){ $.ajax({ url: 'launcher.php?type=sara&port='+port+'&command='+encodeURIComponent(command)+'&timeout='+timeout, + dataType:'text', //dataType: 'json', // Specify that you expect a JSON response method: 'GET', // Use GET or POST depending on your needs success: function(response) { @@ -394,6 +395,7 @@ function getData_saraR4(port, command, timeout){ $("#loading_"+port+"_AT_COPS_Connect").show(); $.ajax({ url: 'launcher.php?type=sara_connectNetwork&port='+port+'&networkID='+encodeURIComponent(networkID)+'&timeout='+timeout, + dataType:'text', //dataType: 'json', // Specify that you expect a JSON response method: 'GET', // Use GET or POST depending on your needs success: function(response) { @@ -415,6 +417,7 @@ function getData_saraR4(port, command, timeout){ $("#loading_mqtt_getConfig").show(); $.ajax({ url: 'launcher.php?type=sara_getMQTT_config&port='+port+'&timeout='+timeout, + dataType:'text', //dataType: 'json', // Specify that you expect a JSON response method: 'GET', // Use GET or POST depending on your needs success: function(response) { @@ -435,6 +438,7 @@ function getData_saraR4(port, command, timeout){ $("#loading_mqtt_login_logout").show(); $.ajax({ url: 'launcher.php?type=sara_getMQTT_login_logout&port='+port+'&login_logout='+login_logout+'&timeout='+timeout, + dataType:'text', //dataType: 'json', // Specify that you expect a JSON response method: 'GET', // Use GET or POST depending on your needs success: function(response) { @@ -482,6 +486,7 @@ function getData_saraR4(port, command, timeout){ $("#loading_mqtt_publish").show(); $.ajax({ url: 'launcher.php?type=sara_MQTT_publish&port='+port+'&timeout='+timeout+'&message='+message, + dataType: 'text', //dataType: 'json', // Specify that you expect a JSON response method: 'GET', // Use GET or POST depending on your needs success: function(response) { @@ -502,6 +507,7 @@ function getData_saraR4(port, command, timeout){ $("#loading_"+port+"_setURL").show(); $.ajax({ url: 'launcher.php?type=sara_setURL&port='+port+'&url='+encodeURIComponent(url), + dataType: 'text', //dataType: 'json', // Specify that you expect a JSON response method: 'GET', // Use GET or POST depending on your needs success: function(response) { @@ -522,6 +528,7 @@ function getData_saraR4(port, command, timeout){ $("#loading_"+port+"_message_write").show(); $.ajax({ url: 'launcher.php?type=sara_writeMessage&port='+port+'&message='+encodeURIComponent(message)+'&type2='+type, + dataType: 'text', //dataType: 'json', // Specify that you expect a JSON response method: 'GET', // Use GET or POST depending on your needs success: function(response) { @@ -545,6 +552,7 @@ function getData_saraR4(port, command, timeout){ $.ajax({ url: 'launcher.php?type=sara_sendMessage&port='+port+'&endpoint='+encodeURIComponent(endpoint), + dataType: 'text', //dataType: 'json', // Specify that you expect a JSON response method: 'GET', // Use GET or POST depending on your needs success: function(response) { @@ -569,6 +577,7 @@ function getData_saraR4(port, command, timeout){ $.ajax({ url: 'launcher.php?type=sara_APN&port='+port+'&APN_address='+encodeURIComponent(APN_address)+'&timeout='+timeout, //dataType: 'json', // Specify that you expect a JSON response + dataType: 'text', method: 'GET', // Use GET or POST depending on your needs success: function(response) { console.log(response); diff --git a/html/sensors.html b/html/sensors.html index 6a30f90..a6e8ce8 100755 --- a/html/sensors.html +++ b/html/sensors.html @@ -163,6 +163,7 @@ function getNoise_values(){ $.ajax({ url: 'launcher.php?type=noise', + dataType: 'text', method: 'GET', // Use GET or POST depending on your needs success: function(response) { console.log(response); @@ -197,6 +198,8 @@ function getBME280_values(){ $.ajax({ url: 'launcher.php?type=BME280', + dataType: 'text', + method: 'GET', // Use GET or POST depending on your needs success: function(response) { console.log(response);