File: demos/demo_json_init_with_mustache/

Recommend this page to a friend!
  Classes of Emmanuel Podvin  >  Blapy  >  demos/demo_json_init_with_mustache/  >  Download  
File: demos/demo_json_init_with_mustache/
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Blapy
jQuery plugin to load linked pages using AJAX
Author: By
Last change: Update of demos/demo_json_init_with_mustache/
Date: 1 year ago
Size: 1,042 bytes


Class file image Download
<?php $purejson = empty($_REQUEST['purejson'])?false:true; if (!$purejson) { //blapy block echo <<<EOT <div id="results" data-blapy-container="true" data-blapy-container-name="results" data-blapy-container-content="resultsnew" > EOT; } switch($_REQUEST['action']) { case 'one': echo <<<EOT {firstname: "John",lastname: "Doe"} EOT; break; case 'some': echo <<<EOT [ {firstname: "John",lastname: "Doe"}, {firstname: "Nina",lastname: "Hagen"}, ] EOT; break; case 'someinresults': echo <<<EOT { "message":"multiple in results", "data":{ "results":[ {firstname: "John",lastname: "Doe"}, {firstname: "Nina",lastname: "Hagen"}, ] } } EOT; break; case 'all': default: echo <<<EOT [ {firstname: "John",lastname: "Doe"}, {firstname: "Bob",lastname: "Dylan"}, {blapyIndex:25, firstname: "Peter",lastname: "Rabbit"}, {firstname: "Nina",lastname: "Hagen"}, ] EOT; break; } if (!$purejson) { echo <<<EOT </div> EOT; } exit;