• 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

Clear javascript source cache laravel 5.8

Connecting an HTML webpage to a SQL Server

How to upload mpdf file after generating to s3 bucket in php

Creating live search with AJAX and CodeIgniter

Redis Command To Sort Keys

What is my SQL missing?

Can't call javascript alert alertify library from PHP

Clients authentication and user authentication with laravel

Two buttons one form

PHP: How to quickly split a key=value file into associative array

How to auto populate preferredCountries from intl-tel-input with db output

Codeigniter, Severity: error --> Exception: Too few arguments to function, admin dashboard shows HTTP error 500

Target Laravelista is not instantiable

GRPC installed successfully on ubuntu but php is looking for it in another folder

Where do I need to place a hook for phpunit?

About Contact Privacy policy Terms and conditions