I am working on saving information submitted through a form to parse.com and then redirecting to an alternate page once complete. I have the POST working correctly but cannot find the easiest way to redirect to the new page. Here is my code:
<script>
function validateForm() {
Parse.initialize("1oFe8znPN2CwcEj14eIYaIOuxGtW35ZpmOazlG3H", "fJhaxIenhcwAdp66T14LKw4OukJ3lG6DLpkq1JVV");
var TestObject = Parse.Object.extend("iOS");
var testObject = new TestObject();
testObject.save({Phone: document.forms["appForm"]["phone"].value },{
success: function(object) {
$(".success").show();
},
error: function(model, error) {
$(".error").show();
}
});}
and
<input type="text" name="phone" id="contact_email" class=" form-control input-email" placeholder="Phone Number">
<input type="submit" id="sendingbtn" class="btn" value="Submit">
I had onclick="location.href='appsuccess.html';" in the submit input but it would push sometimes before the POST. Any suggestions? Thanks