• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

AJAX call fails with SyntaxError: Unexpected end of JSON input

javascriptphpjqueryajax


PHP Snippet 1:

var data = {};
 data['rawFiles'] =$('#projectIDs').val(); 
 data['metadata'] = $('#getData').val();
  data['type']=  $('#submitType').val();
  data['pid']='csv';
   data['command']='data/qcTest'

PHP Snippet 2:

$.ajax({type: "POST", url: posturl, data: JSON.stringify(data), dataType: 'json'})

Related Snippets

SMTP ERROR: MAIL FROM command failed: 530 5.7.0 Must issue a STARTTLS command first when using PHPMailer

Confirm Leave on External Links in Wordpress

I want a way to give path to my files which are outside of public folder in laravel

Best way to scrolldown onpageload

Undefined Array Key error when uploading image on php

Get Header Authorization value of a login api (sent with username and password in json body) using php curl

Implode array with array of glue strings

Check if my GET request has Header: Token

What is PHP's equivalent of JavaScript's "array.every()"?

PHP and WebView - Cookie doesn't are the same

Warning: A non-numeric value encountered

Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path: ) in Unknown on line 0

What is my SQL missing?

Trying to iterate over a mongodb cursor twice - failing

Move a child array to parent array and change parent/child name

About Contact Privacy policy Terms and conditions