Skip to content
Snippets Groups Projects
Commit 275f8770 authored by OliverGreen27's avatar OliverGreen27
Browse files

real JSON

parent 4c58f237
No related branches found
No related tags found
No related merge requests found
class SignUp {
constructor(email, password, fname, lname, gender, city, country) {
this.email = email;
this.password = password;
this.firstname = fname;
this.familyname = lname;
this.gender = gender;
this.city = city;
this.country = country;
}
}
displayView = function() {
// the code required to display a view
if (localStorage.getItem("logintoken") != null) {
......@@ -32,13 +20,15 @@ loadWelcomeView = function() {
signupform.addEventListener("submit", function(event) {
event.preventDefault();
if(inputValidation("signupform")) {
var signupObject = new SignUp(signupform["email"].value,
signupform["password"].value,
signupform["fname"].value,
signupform["lname"].value,
signupform["gender"].value,
signupform["city"].value,
signupform["country"].value);
var signupObject = {}
signupObject["email"] = signupform["email"].value;
signupObject["password"] = signupform["password"].value;
signupObject["firstname"] = signupform["fname"].value;
signupObject["familyname"] = signupform["lname"].value;
signupObject["gender"] = signupform["gender"].value;
signupObject["city"] = signupform["city"].value;
signupObject["country"] = signupform["country"].value;
var message = serverstub.signUp(signupObject);
console.log(message);
if (!message.success) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment