From d895b852a6e160496ffc760d46d3719a3d62ff86 Mon Sep 17 00:00:00 2001 From: Nathan Kinkade Date: Sun, 3 Feb 2008 23:23:24 +0000 Subject: Initial checkin of nutridb.org and basic subversion directory structure --- lib/xajax_0.2.4/tests/catchAllFunctionTest.php | 50 ++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 lib/xajax_0.2.4/tests/catchAllFunctionTest.php (limited to 'lib/xajax_0.2.4/tests/catchAllFunctionTest.php') diff --git a/lib/xajax_0.2.4/tests/catchAllFunctionTest.php b/lib/xajax_0.2.4/tests/catchAllFunctionTest.php new file mode 100644 index 0000000..8d103f2 --- /dev/null +++ b/lib/xajax_0.2.4/tests/catchAllFunctionTest.php @@ -0,0 +1,50 @@ +addAlert("formData: " . print_r($formData, true)); + $objResponse->addAssign("submittedDiv", "innerHTML", nl2br(print_r($formData, true))); + return $objResponse->getXML(); +} + +function myCatchAllFunction($funcName, $args) +{ + $objResponse = new xajaxResponse(); + $objResponse->addAlert("This is from the catch all function"); +// return $objResponse; + return test2ndFunction($args[0], $objResponse); +} + +function testForm($formData) +{ + $objResponse = new xajaxResponse(); + $objResponse->addAlert("This is from the regular function"); + return test2ndFunction($formData, $objResponse); +} +$xajax = new xajax(); +$xajax->registerCatchAllFunction("myCatchAllFunction"); +//$xajax->registerFunction("testForm"); +$xajax->processRequests(); +?> + + + +Catch-all Function Test | xajax Tests +printJavascript("../") ?> + + + +

xajax Tests

+

Catch-all Function Test

+ +
+

+

+
+ +
+ + + \ No newline at end of file -- cgit v1.2.3