How to fix my web app project to fetch data from firebase database and fill into html table using javascriptHow do I export data from Firebase Realtime Database?How do I remove javascript validation from my eclipse project?How to pass variables and data from PHP to JavaScript?How to fetch data from firebaseFirebase Fetch data from databaseFetching data from firebase databaseHow to fetch data from firebase databaseFetching data from firebase webFetch data from firebase databaseHow to update firebase database data in html table?How to fetch data from Firebase database?

Developers demotivated due to working on same project for more than 2 years

Uh oh, the propeller fell off

What was the ring Varys took off?

Is it wrong to omit object pronouns in these sentences?

Why does lemon juice reduce the "fish" odor of sea food — specifically fish?

How to continually let my readers know what time it is in my story, in an organic way?

How to redirect stdout to a file, and stdout+stderr to another one?

Unexpected Netflix account registered to my Gmail address - any way it could be a hack attempt?

Are there any sonatas with only two sections?

Why is it harder to turn a motor/generator with shorted terminals?

How to make a not so good looking person more appealing?

Were any of the books mentioned in this scene from the movie Hackers real?

Adding labels and comments to a matrix

Is there an academic word that means "to split hairs over"?

Why do the lights go out when someone enters the dining room on this ship?

Why does the headset man not get on the tractor?

How can we allow remote players to effectively interact with a physical tabletop battle-map?

Can multiple outlets be directly attached to a single breaker?

Substring join or additional table, which is faster?

How to disable Two-factor authentication for Apple ID?

Is there any good reason to write "it is easy to see"?

"The van's really booking"

Given 0s on Assignments with suspected and dismissed cheating?

Are Allah and Hashem one and the same?



How to fix my web app project to fetch data from firebase database and fill into html table using javascript


How do I export data from Firebase Realtime Database?How do I remove javascript validation from my eclipse project?How to pass variables and data from PHP to JavaScript?How to fetch data from firebaseFirebase Fetch data from databaseFetching data from firebase databaseHow to fetch data from firebase databaseFetching data from firebase webFetch data from firebase databaseHow to update firebase database data in html table?How to fetch data from Firebase database?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















Im creating a web app to show data from firebase and display on a table. But I found difficulty in fetching all the data, only one row is displayed.



here is the database structure:
enter image description here



Here is the result:



enter image description here



Please show how can I properly retrieve all data I needed.



here is my code:



<html>
<head>
<title>incident record</title>

<head></head>

<script src="https://www.w3schools.com/lib/w3.js"></script>

<body>

<table id="example" >
<thead>
<tr>
<th>ID</th>
<th>Type</th>
<th>Location</th>
<th># Involved</th>
<th>Caller No.</th>
<th>Date</th>
<th>Detail</th>
<th>Action</th>

</tr>
</thead>

<tbody id="table_body">

<tr w3-repeat="Id">
<td >
Id
</td >
<td>
Incident_type
</td>
<td >
Incident_location
</td>
<td >
Number_Individual
</td>
<td >
Caller_info
</td>
<td >
Date
</td>
</tr>

</tbody>
</table>

<script script src="https://www.gstatic.com/firebasejs/5.9.0/firebase.js"></script>

<script>

var config =
apiKey: "key",
authDomain: "domain",
databaseURL: "https:/firebaseio.com",
projectId: "1faf5",
storageBucket: "appspot.com",
messagingSenderId: "123451"
;
firebase.initializeApp(config);

var rootRef = firebase.database().ref("messages");

rootRef.on("child_added",snap =>
var Id = firebase.database().ref().push().getKey();

var Incident_type = snap.child("Incident_type").val();
var Incident_location = snap.child("Incident_location").val();
var Number_Individual = snap.child("Number_Individual").val();
var Caller_info = snap.child("Caller_info").val();
var Date = snap.child("Date").val();
//$('#table_body').append("<tr><td id='id'>" + Id + "</td><td>"

var myObject= Id:[

"Id": Id,
"Caller_info" : Caller_info ,
"Date" : Date,
"Incident_location" :Incident_location,
"Incident_type" : Incident_type,
"Number_Individual" : Number_Individual
,
];

w3.displayObject("example", myObject);
);

</script>

</body>
</html>









share|improve this question
























  • Can you show us the Database data ?? You can export the database data and paste it in the question Click me to See how to export

    – Fire-In-D-Hole
    Mar 23 at 14:24












  • Not knowing much about firebase or w3. Put a debugger; before w3.displayObject. Open the F12 console and inspect myObject and see if you are actually getting more than one line of data back. Use the network tab to see what kind of data is being posted back, Use the console to see if there are any javascript errors. Also I added w3 and javascript tags because I suspect that's where your real problem is.

    – Nick.McDermaid
    Mar 24 at 1:46












  • Good day @André Kool I already updated my post the database structure was already included, thanks for the response..

    – cdrrmo maasincity
    Mar 24 at 3:18











  • thanks @Nick.McDermaid i will try your advice....

    – cdrrmo maasincity
    Mar 24 at 3:19

















0















Im creating a web app to show data from firebase and display on a table. But I found difficulty in fetching all the data, only one row is displayed.



here is the database structure:
enter image description here



Here is the result:



enter image description here



Please show how can I properly retrieve all data I needed.



here is my code:



<html>
<head>
<title>incident record</title>

<head></head>

<script src="https://www.w3schools.com/lib/w3.js"></script>

<body>

<table id="example" >
<thead>
<tr>
<th>ID</th>
<th>Type</th>
<th>Location</th>
<th># Involved</th>
<th>Caller No.</th>
<th>Date</th>
<th>Detail</th>
<th>Action</th>

</tr>
</thead>

<tbody id="table_body">

<tr w3-repeat="Id">
<td >
Id
</td >
<td>
Incident_type
</td>
<td >
Incident_location
</td>
<td >
Number_Individual
</td>
<td >
Caller_info
</td>
<td >
Date
</td>
</tr>

</tbody>
</table>

<script script src="https://www.gstatic.com/firebasejs/5.9.0/firebase.js"></script>

<script>

var config =
apiKey: "key",
authDomain: "domain",
databaseURL: "https:/firebaseio.com",
projectId: "1faf5",
storageBucket: "appspot.com",
messagingSenderId: "123451"
;
firebase.initializeApp(config);

var rootRef = firebase.database().ref("messages");

rootRef.on("child_added",snap =>
var Id = firebase.database().ref().push().getKey();

var Incident_type = snap.child("Incident_type").val();
var Incident_location = snap.child("Incident_location").val();
var Number_Individual = snap.child("Number_Individual").val();
var Caller_info = snap.child("Caller_info").val();
var Date = snap.child("Date").val();
//$('#table_body').append("<tr><td id='id'>" + Id + "</td><td>"

var myObject= Id:[

"Id": Id,
"Caller_info" : Caller_info ,
"Date" : Date,
"Incident_location" :Incident_location,
"Incident_type" : Incident_type,
"Number_Individual" : Number_Individual
,
];

w3.displayObject("example", myObject);
);

</script>

</body>
</html>









share|improve this question
























  • Can you show us the Database data ?? You can export the database data and paste it in the question Click me to See how to export

    – Fire-In-D-Hole
    Mar 23 at 14:24












  • Not knowing much about firebase or w3. Put a debugger; before w3.displayObject. Open the F12 console and inspect myObject and see if you are actually getting more than one line of data back. Use the network tab to see what kind of data is being posted back, Use the console to see if there are any javascript errors. Also I added w3 and javascript tags because I suspect that's where your real problem is.

    – Nick.McDermaid
    Mar 24 at 1:46












  • Good day @André Kool I already updated my post the database structure was already included, thanks for the response..

    – cdrrmo maasincity
    Mar 24 at 3:18











  • thanks @Nick.McDermaid i will try your advice....

    – cdrrmo maasincity
    Mar 24 at 3:19













0












0








0








Im creating a web app to show data from firebase and display on a table. But I found difficulty in fetching all the data, only one row is displayed.



here is the database structure:
enter image description here



Here is the result:



enter image description here



Please show how can I properly retrieve all data I needed.



here is my code:



<html>
<head>
<title>incident record</title>

<head></head>

<script src="https://www.w3schools.com/lib/w3.js"></script>

<body>

<table id="example" >
<thead>
<tr>
<th>ID</th>
<th>Type</th>
<th>Location</th>
<th># Involved</th>
<th>Caller No.</th>
<th>Date</th>
<th>Detail</th>
<th>Action</th>

</tr>
</thead>

<tbody id="table_body">

<tr w3-repeat="Id">
<td >
Id
</td >
<td>
Incident_type
</td>
<td >
Incident_location
</td>
<td >
Number_Individual
</td>
<td >
Caller_info
</td>
<td >
Date
</td>
</tr>

</tbody>
</table>

<script script src="https://www.gstatic.com/firebasejs/5.9.0/firebase.js"></script>

<script>

var config =
apiKey: "key",
authDomain: "domain",
databaseURL: "https:/firebaseio.com",
projectId: "1faf5",
storageBucket: "appspot.com",
messagingSenderId: "123451"
;
firebase.initializeApp(config);

var rootRef = firebase.database().ref("messages");

rootRef.on("child_added",snap =>
var Id = firebase.database().ref().push().getKey();

var Incident_type = snap.child("Incident_type").val();
var Incident_location = snap.child("Incident_location").val();
var Number_Individual = snap.child("Number_Individual").val();
var Caller_info = snap.child("Caller_info").val();
var Date = snap.child("Date").val();
//$('#table_body').append("<tr><td id='id'>" + Id + "</td><td>"

var myObject= Id:[

"Id": Id,
"Caller_info" : Caller_info ,
"Date" : Date,
"Incident_location" :Incident_location,
"Incident_type" : Incident_type,
"Number_Individual" : Number_Individual
,
];

w3.displayObject("example", myObject);
);

</script>

</body>
</html>









share|improve this question
















Im creating a web app to show data from firebase and display on a table. But I found difficulty in fetching all the data, only one row is displayed.



here is the database structure:
enter image description here



Here is the result:



enter image description here



Please show how can I properly retrieve all data I needed.



here is my code:



<html>
<head>
<title>incident record</title>

<head></head>

<script src="https://www.w3schools.com/lib/w3.js"></script>

<body>

<table id="example" >
<thead>
<tr>
<th>ID</th>
<th>Type</th>
<th>Location</th>
<th># Involved</th>
<th>Caller No.</th>
<th>Date</th>
<th>Detail</th>
<th>Action</th>

</tr>
</thead>

<tbody id="table_body">

<tr w3-repeat="Id">
<td >
Id
</td >
<td>
Incident_type
</td>
<td >
Incident_location
</td>
<td >
Number_Individual
</td>
<td >
Caller_info
</td>
<td >
Date
</td>
</tr>

</tbody>
</table>

<script script src="https://www.gstatic.com/firebasejs/5.9.0/firebase.js"></script>

<script>

var config =
apiKey: "key",
authDomain: "domain",
databaseURL: "https:/firebaseio.com",
projectId: "1faf5",
storageBucket: "appspot.com",
messagingSenderId: "123451"
;
firebase.initializeApp(config);

var rootRef = firebase.database().ref("messages");

rootRef.on("child_added",snap =>
var Id = firebase.database().ref().push().getKey();

var Incident_type = snap.child("Incident_type").val();
var Incident_location = snap.child("Incident_location").val();
var Number_Individual = snap.child("Number_Individual").val();
var Caller_info = snap.child("Caller_info").val();
var Date = snap.child("Date").val();
//$('#table_body').append("<tr><td id='id'>" + Id + "</td><td>"

var myObject= Id:[

"Id": Id,
"Caller_info" : Caller_info ,
"Date" : Date,
"Incident_location" :Incident_location,
"Incident_type" : Incident_type,
"Number_Individual" : Number_Individual
,
];

w3.displayObject("example", myObject);
);

</script>

</body>
</html>






javascript firebase firebase-realtime-database w3.js






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 24 at 1:47









Nick.McDermaid

12.2k32756




12.2k32756










asked Mar 23 at 14:19









cdrrmo maasincitycdrrmo maasincity

12




12












  • Can you show us the Database data ?? You can export the database data and paste it in the question Click me to See how to export

    – Fire-In-D-Hole
    Mar 23 at 14:24












  • Not knowing much about firebase or w3. Put a debugger; before w3.displayObject. Open the F12 console and inspect myObject and see if you are actually getting more than one line of data back. Use the network tab to see what kind of data is being posted back, Use the console to see if there are any javascript errors. Also I added w3 and javascript tags because I suspect that's where your real problem is.

    – Nick.McDermaid
    Mar 24 at 1:46












  • Good day @André Kool I already updated my post the database structure was already included, thanks for the response..

    – cdrrmo maasincity
    Mar 24 at 3:18











  • thanks @Nick.McDermaid i will try your advice....

    – cdrrmo maasincity
    Mar 24 at 3:19

















  • Can you show us the Database data ?? You can export the database data and paste it in the question Click me to See how to export

    – Fire-In-D-Hole
    Mar 23 at 14:24












  • Not knowing much about firebase or w3. Put a debugger; before w3.displayObject. Open the F12 console and inspect myObject and see if you are actually getting more than one line of data back. Use the network tab to see what kind of data is being posted back, Use the console to see if there are any javascript errors. Also I added w3 and javascript tags because I suspect that's where your real problem is.

    – Nick.McDermaid
    Mar 24 at 1:46












  • Good day @André Kool I already updated my post the database structure was already included, thanks for the response..

    – cdrrmo maasincity
    Mar 24 at 3:18











  • thanks @Nick.McDermaid i will try your advice....

    – cdrrmo maasincity
    Mar 24 at 3:19
















Can you show us the Database data ?? You can export the database data and paste it in the question Click me to See how to export

– Fire-In-D-Hole
Mar 23 at 14:24






Can you show us the Database data ?? You can export the database data and paste it in the question Click me to See how to export

– Fire-In-D-Hole
Mar 23 at 14:24














Not knowing much about firebase or w3. Put a debugger; before w3.displayObject. Open the F12 console and inspect myObject and see if you are actually getting more than one line of data back. Use the network tab to see what kind of data is being posted back, Use the console to see if there are any javascript errors. Also I added w3 and javascript tags because I suspect that's where your real problem is.

– Nick.McDermaid
Mar 24 at 1:46






Not knowing much about firebase or w3. Put a debugger; before w3.displayObject. Open the F12 console and inspect myObject and see if you are actually getting more than one line of data back. Use the network tab to see what kind of data is being posted back, Use the console to see if there are any javascript errors. Also I added w3 and javascript tags because I suspect that's where your real problem is.

– Nick.McDermaid
Mar 24 at 1:46














Good day @André Kool I already updated my post the database structure was already included, thanks for the response..

– cdrrmo maasincity
Mar 24 at 3:18





Good day @André Kool I already updated my post the database structure was already included, thanks for the response..

– cdrrmo maasincity
Mar 24 at 3:18













thanks @Nick.McDermaid i will try your advice....

– cdrrmo maasincity
Mar 24 at 3:19





thanks @Nick.McDermaid i will try your advice....

– cdrrmo maasincity
Mar 24 at 3:19












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55314651%2fhow-to-fix-my-web-app-project-to-fetch-data-from-firebase-database-and-fill-into%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55314651%2fhow-to-fix-my-web-app-project-to-fetch-data-from-firebase-database-and-fill-into%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현