• 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

nginx err_connection_refused, can anyone help me?

Laravel s3 upload file with metadata using pre-signed url

301 Redirect to remove query string on homepage only

Additional price based on cart item count in WooCommerce

Issue saving card for customer

Display the WooCommerce product price inside a custom function

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

How can I solve "laravel/horizon v1.1.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system"?

"Mixed content blocked" when running an HTTP AJAX operation in an HTTPS page

PHP: How to raise number to (tiny) fractional exponent?

Cannot connect to own websocket server when on secured domain

Auto increment id JSON

How to programmatically find public properties of a class from inside one of it's methods

Is there a way to correctly use sanitize_text_field and wp_unslash that doesn't cause psalm to error with "expects string, possibly different type"

Log a user out of a website when they put their computer to sleep

About Contact Privacy policy Terms and conditions