You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var id = $('#My-ID-Input').val();
$.ajax({
type: 'post',
url: '/id',
data : {
id : id
},
success: function(data) {
var id = data.id;
$('#My-ID-Input').val(id);
},
error: function(err) {
console.log(err);
}
});
}
Server Side
app.post('/id', function(req, res) {
var data = req.body;
var id = data.id;
var query = "SELECT * FROM Control WHERE id=" + id;
connection.query(query, function(error, result) {
console.log(result);
res.send(result);
});
});
`
In the above example inside the "connection.query" I am thinking of saving data from form into a parse server app.
So HTML form > ajax with jquery > node server > save object from form to parse server app?
So if I replace the ajax with something like the following
I am looking to do the following:
http://stackoverflow.com/questions/32700914/how-do-i-transfer-data-from-a-client-side-form-input-to-a-server-side-nodejs-scr
`
Client Side
function select() {
}
Server Side
app.post('/id', function(req, res) {
});
`
In the above example inside the "connection.query" I am thinking of saving data from form into a parse server app.
So HTML form > ajax with jquery > node server > save object from form to parse server app?
So if I replace the ajax with something like the following
https://www.parse.com/questions/using-jquery-and-ajax-to-assign-uploaded-file-to-new-parse-object
`
$.ajax({
type: "POST",
beforeSend: function(request) {
request.setRequestHeader("X-Parse-Application-Id", 'YourAppIDkey');
request.setRequestHeader("X-Parse-REST-API-Key", 'YourRestAPIkey');
request.setRequestHeader("Content-Type", file.type);
},
url: serverUrl,
data: file,
processData: false,
contentType: false,
success: function(data) {
`
How do I direct it to the right cloudcode function to define and save the object?
Or should I do something like this:
http://stackoverflow.com/questions/2138527/php-curl-http-post-sample-code
Just looking for a bit of guidance any help is appreciated.
The text was updated successfully, but these errors were encountered: