I am creating a simple polling website using HTML & JavaScript (through Glitch) and also Firebase, I followed a tutorial to do it. I have it all working and the voting works fine and displays the results as intended. I now want to take the results and use them to display a chart on my HTML page. I understand how
Tag: firebase-realtime-database
Firebase not working on script but on main html it does (Javascript)
after pasting the given data of my database, doing retrieves correctly the data and its shown as i want, but making a function on a index.js gives me this error Uncaught ReferenceError: data is not defined at extend (index.js:59) at index.js:61 I dont get why it would work outside the function and not inside, given that window.db is a global
How to push to a child node while updating values in the parent node Firebase RealTime
I am trying to update the values in the parent node of a firebase realtime db while simultaneously pushing data to a child node, however I get the error “Reference.update failed: First argument contains a path /xyz that is ancestor of another path /xyz/…/…” And my data is structured as so: Answer Your updates contains these two keys: It helps
Why does one code give me the right key from firebase and the other does not?
I’ve been working on a simple card catalog project that takes input from a form and displays it on a card. On each card is the option to remove the card completely, or check/uncheck a box. In order to do this, I need to access the object in the firebase real-time database. Each object is created by a .push() and
How to push data as an array of an index to firebase?
I have an keys and want to push it to a specific item in my DB and i use .push() method when I add an item to firebase but it does not work as what I need it generates a new key and inside it add index what i got What I need Code SOLVED By JS :”D i make
How to run a background Cloud Function and schedule a change in database?
I’m developing an app using React Native and Firebase Realtime database. I want to do something like this. From the app, I set a time duration and press a button. Then, it writes data to the Firebase. Assume that I set the time duration to 1000000000 ms and press the button. Then, the database looks like this: I want to
Firebase database – filtering and ordering query
I’m working on a React Native app, and trying to set up a user research in the database, based on a given text. Here is my request code : Database looks like : The query returns what I want, but I have an error on each query only saying “@firebase/database:”. And nothing else… How can I fix it? Answer Most
Firebase how to break realtime database transaction with different state/message if different condition is true?
is it a good practice at all and if yes what is the correct way to break a transaction with different error states/messages for different situations? I have a transaction running over an ‘offer’ entry doing ‘seats’ reservation: I want to break it if one of the following 3 conditions is true and return state/message to the caller function. if
How to get firebase id
Anyone know how to get the Firebase unique id? I’ve tried name(), name, key, key(). Nothing works. I am able to see the data but I have no idea how to get the id back. I need it. Answer The call to push will return a Firebase reference. If you are using the Firebase 3 API, you can obtain the
Get GeoFire to return null if there is no index within radius zone
I am building a webapp with angularjs and am using firebase. I am using geofire to return values that are within a given radius of a given lat, lng. It s fully working and returns what I want when there are values in the radius. However, when there are no values in the radius zone it returns nothing. This is