• 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

Sum column values from multiple arrays

Error when uploading certain .png files "Interlace handling should be turned on when using png_read_image"

Jquery DataTables: Data not displaying in table via Ajax

Yii2 select2 database exception number of bound variables does not match number of tokens

Form Validation and Submission to database

GA4 custom event from server side, can someone tell me how i can do the following code in php?

generate an Excel file using PHP

How can I convert from a{a{} b{}} to a[a[],b[]] using php preg_match?

Upload a file Using PHP and JavaScript

Find out the name of the last script that included the current one

How to separate letters and digits from a string in php

Comma separated list from array with "and" before last element

If you intend you use SMTP, add your SMTP Code after this Line

Composer Script echo

browsersync doesn't work with XAMPP

About Contact Privacy policy Terms and conditions