I am trying to post an ajax request using jquery
var peName = document.getElementById(\"peName\").value;
var peSubName = document.getElementById(\"peSub
I'm a novice, but this error happened to me when I did something like the following:
// the following will *error*
var element = $("#elementId");
$.post("/foo/bar/", { xxx : element });
Anytime you feed $.post
something other than a string
, JS errors. i.e., peId
, pecatId
, etc. must all be strings, not jQuery objects.
Ok, so you seem to be missing your function call closure bracket.
$.post("/product/saveEditProduct",
{
peId : peId,
pecatId : pecatId,
peName : peName,
peSubName : peSubName,
peDesc : peDesc,
pePrice : pePrice,
radioActive : radioActive,
radioSpicy : radioSpicy,
radioVeg : radioVeg,
});