I am not able to see the data in firebase database after giving the input through UI. Can anyone please help.
<body>
<input id="username" type="text" placeholder="Name"><br/>
<input id="text" type="text" placeholder="Message"><br/>
<button id="post">Send</button><br/>
<div id="results"></div>
<script>
var myFirebase = new Firebase('http://ift.tt/2v80BH5');
var usernameInput = document.getElementByID("username");
var textInput = document.getElementByID("text");
var postButton = document.getElementByID("post");
postButton.addEventListener("click", function() {
myFirebase.push(usernameInput + " says: " + textInput);
textInput.value = "";
},false);
Aucun commentaire:
Enregistrer un commentaire