• 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

Mysqli multi query error

Sort multidimensional array by column value within a column

How to get result of the formula on import xlsx with maatwebsite using Laravel? I get formula and not value of the formula

Fatal error: Uncaught Error: Call to undefined method mysqli_stmt::fetch_assoc() [duplicate]

Json_Encode not returning html even i try to encode JSON_HEX_QUOT | JSON_HEX_TAG

Twig - How to check if variable is a number / integer

How to read laravel_session cookies saved in cookie memory of browser in client side?

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

protect images from being copied

Laravel Livewire: jQuery not working in child component loaded via @if statement

How can I make good efficent AJAX live forms with just jQuery and

500 (Internal Server Error) with Laravel & Docker [duplicate]

Laravel 8 Multiple Relationships for Factory

PHP: PDO + CSV export not downloading (headers issue?)

Laravel Sanctum CSRF not authenticating

About Contact Privacy policy Terms and conditions