Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing Parse.com with Phonegap; Trouble with user registration
    primarykey
    data
    text
    <p>I'm building an Android application using Phonegap and Parse.com to aid in "database" management. I have an html form to hold user "username" and user "password" with a submit input button with id "adduserbutton". </p> <p>Here is my login.html form. (Note, this html file is referencing a file named "main.js" which stores the logic behind registering a user.</p> <pre><code> &lt;form id ="adduser"&gt; &lt;label for="text-3"&gt;Username:&lt;/label&gt; &lt;input type="text" data-clear-btn="true" id="username" id="text-3" placeHolder="Enter Desired Username"&gt; &lt;label for="text-3"&gt;Password:&lt;/label&gt; &lt;input type="text" data-clear-btn="true" id="password" id="text-3" placeholder="Enter Desired Password"&gt; &lt;input type="submit" id="adduserbutton" value="Add User"&gt; &lt;/form&gt; </code></pre> <p>This form will take username and password (not hashed yet, simply testing at this moment). Main.js sits waiting for "adduserbutton" to be clicked, and should then run a function. This is where the trouble is, so here is my main.js code:</p> <pre><code>//Parse related keys var PARSE_APP = "hidden for sake of post"; var PARSE_JS = "hidden for sake of post"; $(document).ready(function() { Parse.initialize(PARSE_APP, PARSE_JS); var user = new Parse.User(); $("#adduserbutton").on("touchend", function(e) { alert("here"); e.preventDefault(); //Grab the user details, no real validation for now var username = $("#username").val(); user.set("username", username); var password = $("#password").val(); user.set("password", password); user.signUp(null, { success: function(user) { alert("it worked") }, error: function(user, error) { alert("error"); } }); }); </code></pre> <p>As you can see, what 'should' be happening here is:</p> <ol> <li>User types in desired username &amp; password, clicks submit button.</li> <li>"adduserbutton" is clicked, firing main.js to store data?</li> <li>username and password form text fields stored into user Parse object.</li> <li>User registered into my Parse table. </li> </ol> <p>Yet, I click the submit button, the page flashes (seems to refresh), and nothing happens. No errors, and nothing is showing up in my database. Any help? Thanks! </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload