Doing a post method on jQueryIs there an “exists” function for jQuery?Add table row in jQueryHow do I check if an element is hidden in jQuery?Setting “checked” for a checkbox with jQuery?How can I know which radio button is selected via jQuery?How to check whether a checkbox is checked in jQuery?Disable/enable an input with jQuery?How can I refresh a page with jQuery?jQuery scroll to element“Thinking in AngularJS” if I have a jQuery background?
What is the highest possible permanent AC at character creation?
Is using haveibeenpwned to validate password strength rational?
Pre-1972 sci-fi short story or novel: alien(?) tunnel where people try new moves and get destroyed if they're not the correct ones
System.StringException: Unexpected end of expression
How is water heavier than petrol, even though its molecular weight is less than petrol?
What ways have you found to get edits from non-LaTeX users?
Winning Strategy for the Magician and his Apprentice
Share calendar details request from manager's manager
What is the `some` keyword in SwiftUI?
Generate a Graeco-Latin square
bash script: "*.jpg" expansion not working as expected inside $(...), for picking a random file
Confusion around using "des" in sentences
English word for "product of tinkering"
What can I, as a user, do about offensive reviews in App Store?
How do governments keep track of their issued currency?
1980s live-action movie where individually-coloured nations on clouds fight
Were Alexander the Great and Hephaestion lovers?
Déjà vu, again?
Do simulator games use a realistic trajectory to get into orbit?
How does an ordinary object become radioactive?
Thread Pool C++ Implementation
Soft question: Examples where lack of mathematical rigour cause security breaches?
Why would future John risk sending back a T-800 to save his younger self?
How can electric fields be used to detect cracks in metals?
Doing a post method on jQuery
Is there an “exists” function for jQuery?Add table row in jQueryHow do I check if an element is hidden in jQuery?Setting “checked” for a checkbox with jQuery?How can I know which radio button is selected via jQuery?How to check whether a checkbox is checked in jQuery?Disable/enable an input with jQuery?How can I refresh a page with jQuery?jQuery scroll to element“Thinking in AngularJS” if I have a jQuery background?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
enter image description here
I have a screenshot above I am trying to do a post method for adding another movie here is my code below
$(function()
$("#showMovies").click(function()
const $movielist = $('#movielist');
$.ajax(
method:"GET",
url: "http://localhost:3000/movielist",
dataType: "json",
success: function (response)
$.each(response, function(i, movie)
$movielist.append('<li>idmovielist: ' + movie.idmovielist + ', thumnail_path: ' +
movie.thumnail_path + ', description: ' + movie.description + ', year_released: ' + movie.year_released +
', language_released: ' + movie.language_released + '</li>');
);
);
);
$("#movieAdded").click(function()
const $idmovielist = $('#idmovielist');
const $name = $('#name');
const $thumnail_path = $('#thumnail_path');
const $description = $('description');
const $language_released = $('language_released');
const $year_released = $('year_released');
const movies =
idmovielist: $idmovielist.val(),
name: $name.val(),
thumnail_path: $thumnail_path.val(),
description: $description.val(),
year_released: $year_released.val(),
language_released: $language_released.val(),
;
$.ajax(
method:"POST",
url: "http://localhost:3000/movielist/addMovie",
data: movies,
success: function (newMovie)
$movielist.append('<li>idmovielist: ' + newMovie.idmovielist + ', thumnail_path: ' +
newMovie.thumnail_path + ', description: ' + newMovie.description + ', year_released: ' + newMovie.year_released +
', language_released: ' + newMovie.language_released + '</li>');
);
);
);
I am trying to post it but I can an error on my terminal that I have code:
'ER_PARSE_ERROR',
errno: 1064,
sqlMessage: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1',
sqlState: '42000',
index: 0,
sql: 'INSERT INTO movielist SET ' }
jquery
|
show 1 more comment
enter image description here
I have a screenshot above I am trying to do a post method for adding another movie here is my code below
$(function()
$("#showMovies").click(function()
const $movielist = $('#movielist');
$.ajax(
method:"GET",
url: "http://localhost:3000/movielist",
dataType: "json",
success: function (response)
$.each(response, function(i, movie)
$movielist.append('<li>idmovielist: ' + movie.idmovielist + ', thumnail_path: ' +
movie.thumnail_path + ', description: ' + movie.description + ', year_released: ' + movie.year_released +
', language_released: ' + movie.language_released + '</li>');
);
);
);
$("#movieAdded").click(function()
const $idmovielist = $('#idmovielist');
const $name = $('#name');
const $thumnail_path = $('#thumnail_path');
const $description = $('description');
const $language_released = $('language_released');
const $year_released = $('year_released');
const movies =
idmovielist: $idmovielist.val(),
name: $name.val(),
thumnail_path: $thumnail_path.val(),
description: $description.val(),
year_released: $year_released.val(),
language_released: $language_released.val(),
;
$.ajax(
method:"POST",
url: "http://localhost:3000/movielist/addMovie",
data: movies,
success: function (newMovie)
$movielist.append('<li>idmovielist: ' + newMovie.idmovielist + ', thumnail_path: ' +
newMovie.thumnail_path + ', description: ' + newMovie.description + ', year_released: ' + newMovie.year_released +
', language_released: ' + newMovie.language_released + '</li>');
);
);
);
I am trying to post it but I can an error on my terminal that I have code:
'ER_PARSE_ERROR',
errno: 1064,
sqlMessage: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1',
sqlState: '42000',
index: 0,
sql: 'INSERT INTO movielist SET ' }
jquery
Post the error as well
– Pranav C Balan
Mar 24 at 17:21
1
The the problem is insideaddMovie
method on the server side. Show us your method implementation.
– Allen King
Mar 24 at 17:30
@AllenKing app.post('/movielist/addMovie',(req, res) => mysqlConnection.query("INSERT INTO movielist SET ?",req.body, (err,rows) => if (!err) res.send("Movie is added"); else console.log(err); ); ); this is what I got
– Adil Ali
Mar 24 at 17:32
The request body is a json object.
– Allen King
Mar 24 at 17:41
@AllenKing I know and
– Adil Ali
Mar 24 at 17:43
|
show 1 more comment
enter image description here
I have a screenshot above I am trying to do a post method for adding another movie here is my code below
$(function()
$("#showMovies").click(function()
const $movielist = $('#movielist');
$.ajax(
method:"GET",
url: "http://localhost:3000/movielist",
dataType: "json",
success: function (response)
$.each(response, function(i, movie)
$movielist.append('<li>idmovielist: ' + movie.idmovielist + ', thumnail_path: ' +
movie.thumnail_path + ', description: ' + movie.description + ', year_released: ' + movie.year_released +
', language_released: ' + movie.language_released + '</li>');
);
);
);
$("#movieAdded").click(function()
const $idmovielist = $('#idmovielist');
const $name = $('#name');
const $thumnail_path = $('#thumnail_path');
const $description = $('description');
const $language_released = $('language_released');
const $year_released = $('year_released');
const movies =
idmovielist: $idmovielist.val(),
name: $name.val(),
thumnail_path: $thumnail_path.val(),
description: $description.val(),
year_released: $year_released.val(),
language_released: $language_released.val(),
;
$.ajax(
method:"POST",
url: "http://localhost:3000/movielist/addMovie",
data: movies,
success: function (newMovie)
$movielist.append('<li>idmovielist: ' + newMovie.idmovielist + ', thumnail_path: ' +
newMovie.thumnail_path + ', description: ' + newMovie.description + ', year_released: ' + newMovie.year_released +
', language_released: ' + newMovie.language_released + '</li>');
);
);
);
I am trying to post it but I can an error on my terminal that I have code:
'ER_PARSE_ERROR',
errno: 1064,
sqlMessage: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1',
sqlState: '42000',
index: 0,
sql: 'INSERT INTO movielist SET ' }
jquery
enter image description here
I have a screenshot above I am trying to do a post method for adding another movie here is my code below
$(function()
$("#showMovies").click(function()
const $movielist = $('#movielist');
$.ajax(
method:"GET",
url: "http://localhost:3000/movielist",
dataType: "json",
success: function (response)
$.each(response, function(i, movie)
$movielist.append('<li>idmovielist: ' + movie.idmovielist + ', thumnail_path: ' +
movie.thumnail_path + ', description: ' + movie.description + ', year_released: ' + movie.year_released +
', language_released: ' + movie.language_released + '</li>');
);
);
);
$("#movieAdded").click(function()
const $idmovielist = $('#idmovielist');
const $name = $('#name');
const $thumnail_path = $('#thumnail_path');
const $description = $('description');
const $language_released = $('language_released');
const $year_released = $('year_released');
const movies =
idmovielist: $idmovielist.val(),
name: $name.val(),
thumnail_path: $thumnail_path.val(),
description: $description.val(),
year_released: $year_released.val(),
language_released: $language_released.val(),
;
$.ajax(
method:"POST",
url: "http://localhost:3000/movielist/addMovie",
data: movies,
success: function (newMovie)
$movielist.append('<li>idmovielist: ' + newMovie.idmovielist + ', thumnail_path: ' +
newMovie.thumnail_path + ', description: ' + newMovie.description + ', year_released: ' + newMovie.year_released +
', language_released: ' + newMovie.language_released + '</li>');
);
);
);
I am trying to post it but I can an error on my terminal that I have code:
'ER_PARSE_ERROR',
errno: 1064,
sqlMessage: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1',
sqlState: '42000',
index: 0,
sql: 'INSERT INTO movielist SET ' }
jquery
jquery
edited Mar 24 at 21:19
marc_s
592k13311331278
592k13311331278
asked Mar 24 at 17:19
Adil AliAdil Ali
44
44
Post the error as well
– Pranav C Balan
Mar 24 at 17:21
1
The the problem is insideaddMovie
method on the server side. Show us your method implementation.
– Allen King
Mar 24 at 17:30
@AllenKing app.post('/movielist/addMovie',(req, res) => mysqlConnection.query("INSERT INTO movielist SET ?",req.body, (err,rows) => if (!err) res.send("Movie is added"); else console.log(err); ); ); this is what I got
– Adil Ali
Mar 24 at 17:32
The request body is a json object.
– Allen King
Mar 24 at 17:41
@AllenKing I know and
– Adil Ali
Mar 24 at 17:43
|
show 1 more comment
Post the error as well
– Pranav C Balan
Mar 24 at 17:21
1
The the problem is insideaddMovie
method on the server side. Show us your method implementation.
– Allen King
Mar 24 at 17:30
@AllenKing app.post('/movielist/addMovie',(req, res) => mysqlConnection.query("INSERT INTO movielist SET ?",req.body, (err,rows) => if (!err) res.send("Movie is added"); else console.log(err); ); ); this is what I got
– Adil Ali
Mar 24 at 17:32
The request body is a json object.
– Allen King
Mar 24 at 17:41
@AllenKing I know and
– Adil Ali
Mar 24 at 17:43
Post the error as well
– Pranav C Balan
Mar 24 at 17:21
Post the error as well
– Pranav C Balan
Mar 24 at 17:21
1
1
The the problem is inside
addMovie
method on the server side. Show us your method implementation.– Allen King
Mar 24 at 17:30
The the problem is inside
addMovie
method on the server side. Show us your method implementation.– Allen King
Mar 24 at 17:30
@AllenKing app.post('/movielist/addMovie',(req, res) => mysqlConnection.query("INSERT INTO movielist SET ?",req.body, (err,rows) => if (!err) res.send("Movie is added"); else console.log(err); ); ); this is what I got
– Adil Ali
Mar 24 at 17:32
@AllenKing app.post('/movielist/addMovie',(req, res) => mysqlConnection.query("INSERT INTO movielist SET ?",req.body, (err,rows) => if (!err) res.send("Movie is added"); else console.log(err); ); ); this is what I got
– Adil Ali
Mar 24 at 17:32
The request body is a json object.
– Allen King
Mar 24 at 17:41
The request body is a json object.
– Allen King
Mar 24 at 17:41
@AllenKing I know and
– Adil Ali
Mar 24 at 17:43
@AllenKing I know and
– Adil Ali
Mar 24 at 17:43
|
show 1 more comment
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55326426%2fdoing-a-post-method-on-jquery%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55326426%2fdoing-a-post-method-on-jquery%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Post the error as well
– Pranav C Balan
Mar 24 at 17:21
1
The the problem is inside
addMovie
method on the server side. Show us your method implementation.– Allen King
Mar 24 at 17:30
@AllenKing app.post('/movielist/addMovie',(req, res) => mysqlConnection.query("INSERT INTO movielist SET ?",req.body, (err,rows) => if (!err) res.send("Movie is added"); else console.log(err); ); ); this is what I got
– Adil Ali
Mar 24 at 17:32
The request body is a json object.
– Allen King
Mar 24 at 17:41
@AllenKing I know and
– Adil Ali
Mar 24 at 17:43