Take the 2-minute tour ×  I am trying to pass variables via ajax
to a PHP script that will run a MySQL query. However, I keep
getting the error 404 Not Found with:
"http://myurl/database/%5Bobject%20Object%5D".  It looks like
it's trying to send the data to
http://myurl/database/%5Bobject%20Object%5D instead of the PHP
script I've defined. Really at a loss on this one... I thought
putting the absolute URL in would work.  Below is my code. Would
be eternally grateful for any help....  <script
type="text/javascript"> function insertData()     var dataid=
$('#dataid').attr('value');     var industry =
$('#industry').attr('value');    var geolocation =
$('#geolocation').attr('value');         type: "POST",
url: "http://myURL/database/InsertData.php",         data:
"dataid="+ dataid+"&amp;industry="+ industry
+"&amp;geolocation="+ geolocation, return false;  share|improve
this question Use .val() instead of .attr('value'). –  Rob W Apr
27 '12 at 21:12 @RobW - it is irrelevant –  Mészáros Lajos Jul
18 '13 a