update for the javascript
This commit is contained in:
@@ -124,18 +124,11 @@ function showContainer(className){
|
||||
function runme(data){
|
||||
alert(data)
|
||||
}
|
||||
async function fetchContent(uri) {
|
||||
try {
|
||||
const response = await fetch(uri);
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP error! status: ${response.status}`);
|
||||
}
|
||||
const content = await response.text();
|
||||
return content;
|
||||
} catch (error) {
|
||||
console.error(`There was a problem with the fetch operation: ${error.message}`);
|
||||
}
|
||||
}
|
||||
function fetchContent(uri) {
|
||||
return fetch(uri)
|
||||
.then(response => response.json())
|
||||
.catch(error => console.error('Error:', error));
|
||||
}
|
||||
function updateForm(uri, eid){
|
||||
fetchContent(uri).then(content => {
|
||||
switch(eid){
|
||||
|
Reference in New Issue
Block a user