Corrected json array value
This commit is contained in:
@@ -26,9 +26,8 @@
|
||||
</html>
|
||||
|
||||
<script>
|
||||
var x = '';
|
||||
var bookTitle = '';
|
||||
var bookCommand = '';
|
||||
var manga = '';
|
||||
|
||||
function activeReturn() {
|
||||
document.getElementById('main').innerHTML= '';
|
||||
|
||||
@@ -37,12 +36,12 @@
|
||||
.then(function(data) {
|
||||
for (i=0; i < data.active.length; i++ )
|
||||
{
|
||||
x = data.active[i];
|
||||
<!--console.log(x.title)-->
|
||||
manga = data.active[i];
|
||||
<!--console.log(manga.title)-->
|
||||
var div = document.createElement('div');
|
||||
div.setAttribute('id', x.id);
|
||||
div.setAttribute('id', manga.id);
|
||||
div.setAttribute('class', 'activeList');
|
||||
div.innerHTML = '<b>' + x.title + '</b><br>';
|
||||
div.innerHTML = '<b>' + manga.title + '</b><br>';
|
||||
document.getElementById("main").appendChild(div);
|
||||
};
|
||||
});
|
||||
@@ -77,12 +76,11 @@
|
||||
fetch('/download')
|
||||
.then(response => response.json())
|
||||
.then(function(data){
|
||||
for (i=0; data.updated.length; i++) {
|
||||
bookTitle = data.book[i];
|
||||
bookCommand = data.command[i];
|
||||
for (i=0; data.manga.length; i++) {
|
||||
manga = data.manga[i];
|
||||
var div = document.createElement('div');
|
||||
div.setAttribute('id', 'book'+i);
|
||||
div.innerHTML = bookTitle + "<br>";
|
||||
div.innerHTML = manga.title + "<br>";
|
||||
document.getElementById("updated").appendChild(div);
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user