• 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

How to get median and quartiles/percentiles of an array in JavaScript (or PHP)?

Installing Composer - Internal Error

Navigation idle on content download

How to add automatically collapse/expand in content wordpress (single.php)?

Submitting a form with ajax in Wordpress

Symfony - "framework.test" config is not set to true

Accessors (Getter) & Mutators (Setter) On a Pivot Table in Laravel

How to find the date a user created their Google account

How do I truncate a decimal in PHP?

GuzzleHttp Hangs When Using Localhost

How do I Post to .txt document before form submits

How to use functions that are declared in snippets in Evolution CMS (Modx) in an external PHP Script?

Confirm Leave on External Links in Wordpress

Appending data to an anchor tag

how to create html table in php

About Contact Privacy policy Terms and conditions