分类:
2005-12-13 17:02:40
The latest version of xajax introduces some great new functionality and fixes some important bugs.
New Functionality:
* You can now asynchronously pass single and multidimensional arrays
and associative arrays from javascript as parameters to your PHP
functions. Additionally, if you pass in a javascript object as a
parameter, the php function will receive an associative array
representing the properties of the object.
* Two new javascript helper methods have been added to simplify two common tasks:
xajax.$() is a shorthand alias for document.getElementById().
xajax.getFormValues() can be used in conjunction with a xajax_ function
to easily submit an array representing the values in a form as a
parameter to an xajax asynchronous function call:
xajax_processForm(xajax.getFormValues('FormId'));
This simple syntax allows you to submit form data asynchronously
through xajax, and it works with complex input names like
"checkbox[][]" and "text[first]" to produce multidimensional and
associative arrays, just as if you had submitted the form and used the
PHP $_GET array.
* Added the new addRemove() command method to the xajaxResponse class.
addRemove() will add an XML command to your response to dynamically
remove the specified HTML element from your application.
* Added the new addCreate() command method to the xajaxResponse class.
addCreate() will add an XML command to your response to dynamically
create a new HTML element as a child to an existing element in your
application.
* Added a new getJavascript() method that returns the javascript html
that should be placed between the head tags of your html. This makes
xajax usable with the Smarty template system. You assign a variable in
smarty that contains the xajax javascript:
$smarty->assign('xajax_javascript', $xajax->getJavascript());
Then you can use {$xajax_javascript} in your header template to use
xajax on your Smarty enabled site.
Bug Fixes
* Fixed a bug in URL detection that cause the URLs with nonstandard
ports to be constructed without a colon before the port number.
* Fixed a bug that caused Firefox to reset form values when the xajaxResponse->addAssign() method was used.
* Fixed a bugs in the data encoding that prevented data containing an ampersand from being correctly sent to the xajax server.
* Fixed some serious bugs in the UTF-8 encoding that prevented
non-latin unicode characters from being transmitted correctly though
xajax. Now xajax should work correctly with unicode Russian, Greek,
Arabic, Hebrew, and many other unicode character sets.
For more information about xajax or to download version 0.1 beta4, visit .