the following code does not save to my firebase. alert called1 is called but not called2 and I don't get the other 2 alerts. $("#registerButton").click(function(){ alert( "called1");
ref.createUser({
//email : $("#txtEmail").val().text(),
//password : $("#txtPass").val().text()
email : "test1",
password : "test2"
}, function(error, userData) {
alert( "called2");
if (error) {
console.log("Error creating user:", error);
alert( "error");
} else {
console.log("Successfully created user account with uid:", userData.uid);
//alert( "Successfully created user account with uid:" + userData.uid);
}
});
});
I made it much simpler and it still does not work:
$(document).ready(function(){
$("#registerButton").click(function(){
ref.createUser({
email : "Sbobtony@firebase.com",
password : "correcthorsebatterystaple"
}, function(error, userData) {
if (error) {
console.log("Error creating user:", error);
} else {
console.log("Successfully created user account with uid:", userData.uid);
}
});
});
});