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

How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?