Here is my polymer form and javascript. It pushes well. What I want to do is check if it was successful, and I will hide the form and show some confirmation text or redirect users to another page..,
So, how do I check if a firebase push was successful or not?
<form is="iron-form" method="get" action="firebaseURL/events" id="eventsDemo">
<paper-input name="name" label="Name" required auto-validate></paper-input>
<paper-input name="password" label="Password" type="password" required auto-validate></paper-input>
<paper-checkbox name="read" required>You must check this box</paper-checkbox><br>
<paper-button raised onclick="_delayedSubmit(event)" disabled id="eventsDemoSubmit">
<paper-spinner id="spinner" hidden></paper-spinner>Submit</paper-button>
<div class="output"></div>
</form>
<script>
function _delayedSubmit(event) {
event.preventDefault();
spinner.active = true;
spinner.hidden = false;
eventsDemoSubmit.disabled = true;
// Simulate a slow server response.
setTimeout(function() {
//Polymer.dom(event).localTarget.parentElement.submit();
var firebase = new Firebase(eventsDemo.getAttribute('action'));
firebase.push(eventsDemo.serialize());
}, 100);
}
</script>
dataRef
contains here ? I am not be able to get login method success event as i am able to add user withcreateUserWithEmailAndPassword
injavascript
web. – Ampoule