yWeb: replace XMLHttpRequest() by jquery-function

Origin commit data
------------------
Branch: ni/coolstream
Commit: ab8d666bf9
Author: vanhofen <vanhofen@gmx.de>
Date: 2023-02-18 (Sat, 18 Feb 2023)

Origin message was:
------------------
- yWeb: replace XMLHttpRequest() by jquery-function

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2023-02-18 12:00:13 +01:00
parent 659b454cd6
commit 9c3922a563
2 changed files with 6 additions and 7 deletions

View File

@@ -1,3 +1,3 @@
version=3.0.20
date=14.02.2023
version=3.0.21
date=17.02.2023
info=NI-Neutrino-Webinterface

View File

@@ -4,13 +4,12 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>yWeb</title>
<script type="text/javascript" src="/jquery/jquery.min.js"></script>
<script type="text/javascript">
//<![CDATA[
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", "/etc/hostname", false);
xmlhttp.send();
if (xmlhttp.status == 200)
document.title = xmlhttp.responseText;
jQuery.get("/etc/hostname", function(data) {
jQuery('html head').find('title').text(data);
});
//]]>
</script>
</head>