Hello gurus
I am using jQuery and need some help.
I have a page made up of
Input Field, A signup function. Signup variables
What I want to do is when the 'Signup' function is called, to pass the values of the text fields to the instance variables.
function signUp():
var user = new Parse.User();
var Username = 'xxx';
var Password = 'xxx';
var Email = 'xxx';
user.set("username", Username);
user.set("password", Password);
user.set("email", Email);
Enter your username<input type="text" id="username" name="username"><br>
Enter your password<input type="text" id="password" name="password"><br>
Enter your email address<input type="email" id="email" name="email"><br>
<input type="submit" value="Sign up" onClick="signUp();">
Now the function passes the 'xxx' (typed manually) in OK but I want to pass the input fields contents from the input fields to the variables. Eg what is typed in 'username' to be allocated to var = '$_USERNAME'
I am new to jQuery and just wondering what the syntax is? Also as I am not even actually using a 'form' should I be using a 'submit' button or should I just use a <button> instead?
Thanks in advance
D