Redirect to PHP

Trying to call PHP proxy code by the following:

var ymData = {
	processor: "server.php",
	field1: "foo1",
	field2: "foo2"
};

// Syntax 1: put POST data and no redirects
 webix.ajax().post( "proxy.php", ymData );
 
 // Syntax 2: loose POST data and redirects
 webix.ajax().post( "proxy.php", ymData, function( text ) {
	location.href = "proxy.php";
});

// Syntax 3: put POST data and redirects?

Proxy PHP code is very simple

<?php
$postdata = filter_input_array( INPUT_POST );
if( count( $postdata ) == 0 ) die();
echo count( $postdata );

What’s wrong with webix ajax call? How to put data and redirects both?

Hello,

Webix Ajax helper allows defining request parameters together with a callback function.

As far as I can see, everything works smoothly (check the console for details): http://webix.com/snippet/251aceb1