This is an example page for mooItems, a class build with the great mootool library.

mooItems, was build with comercial documents in mind, like invoices or quotations. mooItems simplifies details items entry through basic configuration. arguments explanation inside class file.

See examples code for more details :

Author : Vladimir Prieto

Example 1 :

operator1*operator2




Example 2 :

(operator1+operator2)*operator2




Example 3 :

- on column 2, type 1,2,3 or 4 and [ENTER].

- delete values from column 3 or 4, and press "show empty".

(operator1*operator2)/operator1




text inside json_file.php :


require_once("JSON.php");

//object to return

$results = array();

//make a new json parser

$json = new Services_JSON;

//decode incoming JSON string

$input = str_replace('json=','',file_get_contents('php://input')); //trick for make it work

$jsonRequest = $json->decode($input);

sleep(1); //little sleep for c the ajax image on localhost :)

$searcher = $jsonRequest->input_searcher;



if ($searcher == 1) {

$results[0] = utf8_encode('1.1');

$results[1] = utf8_encode('2.1');

echo $json->encode($results);

} else if ($searcher == 2) {

$results[0] = utf8_encode('10.2');

$results[1] = utf8_encode('20.2');

echo $json->encode($results);

} else if ($searcher == 3) {

$results[0] = 'error from json';

echo $json->encode($results);

} else if ($searcher == 4) {

echo $json->encode(null);

}

?>