I've created a page for signing up with parse, this is my code where I left the initialization out intentionally:
<input type="text" id="userInput" placeholder="Username" />
<input type="text" id="passInput" placeholder="Password" />
<input type="text" id="emailInput" placeholder="E-Mail" />
<input type="submit" onclick="signUp()" />
<script>
function signUp() {
var user = document.getElementById("userInput").value;
var pass = document.getElementById("passInput").value;
var email = document.getElementById("emailInput").value;
// Create a new instance of the user class
var user = new Parse.User();
user.set("username", user);
user.set("password", pass);
user.set("email", email);
// other fields can be set just like with Parse.Object
user.signUp().then(function(user) {
console.log('User created successful with name: ' + user.get("username") + ' and email: ' + user.get("email"));
}).catch(function(error){
console.log("Error: " + error.code + " " + error.message);
});
}
</script>
but for some reason it returns with the Error that no username is entered, Thank you in advance.