0.2.1 Release Notes
0.2.1 Release Notes
These are the changes since xajax 0.2
Personnel Changes
As you may know, a few months ago Jared White joined the xajax project started by J. Max Wilson. Because of a family medical situation, Jared had to lay low on development for a little while, so the team took the opportunity to enlist another developer who has been a great asset to the xajax community already. He's helped clean up the Javascript code quite a lot, so 0.2.1 has already been heavily influenced by him. Please give it up for: BigBrownChunx! (real name: Eion Robb)
Package-wide Changes
- xajax.js (the compressed Javascript file) is now bundled with the xajax distribution, and xajaxCompress.php has been moved to the base folder rather than the xajax_js folder. This is all part of an effort to make the Javascript side of xajax much easier to install. More changes along these lines noted below.
xajax.inc.php Changes
- Refactored printJavascript and getJavascript. The third argument was removed (no error will occur if you specify a third argument, but it will be ignored), and getJavascript now calls getJavascriptOptions and getJavascriptInclude. Both of those methods can be called independently as well for greater markup flexibility. Also added autoCompressJavascript method, which you can call explicitly if you want xajax to compress a new xajax.js file if it has been deleted from the server. The result of all this is that your xajax_js folder can be set to read-only and no automatic compression or Javascript file copying will take place ever (even in debug mode). Plus it will be simpler to use xajax now if you're using custom file paths.
- Removed what appeared to be a duplicate Content-type header if the response output is in GET mode.
- Changed the error reporting (if the error handler is switched on) so that it only reports the same errors that PHP normally reports based on PHP's configuration (courtesy of vdboor & BigBrownChunx).
- Added a new option decodeUTF8Input that automatically decodes the input args from UTF-8 if switched on (default is off).
- If you have the PHP iconv extension, xajax.inc.php will convert incoming characters into the given character encoding for you automatically.
xajaxResponse.inc.php Changes
- addRedirect() now correctly encodes queries in a url so you don't have to worry about processing it anymore.
- If you have installed the PHP mbstring extension xajaxResponse.inc.php will convert your specified character set characters so that they can be sent to the browser without IE complaining about invalid XML.
- Fixed a bug that prevented innerHTML from being set to integer 0.
- Added a new command addInsertAfter that works just like addInsert, but it adds the element after an existing element rather than before.
- Modified loadXML so that it can accept an XML response string or a regular xajaxResponse (or subclassed) object.
xajax_uncompressed.js Changes
- You can now use either the "on" prefix or leave it off when specifying names for any of the Javascript event handlers in xajax. In other words, "click" and "onclick" should both work interchangably.
- Added the xajax.insertAfter method and new handling for that in the processResponse method.
- xajax.DebugMessage() is always defined, so you can switch debug mode on via Javascript and it will work fine. In addition, the function makes a popup (if you let it) that has debugging information in it, instead of being bothered by annoying alert messages. If you have disabled popups however, xajax will degrade gracefully and use said alert boxes instead.
- A new variable, xajaxLoaded, is set to true at the end of the file, so a new check that was added in the HTML header knows xajax loaded successfully. If that variable is found to be still set to false, then an alert will appear informing the user that the xajax Javascript file could not be loaded.
- xajax.loadingFunction() and xajax.doneLoadingFunction() override functions have been provided to make 'Loading' screens easier to make. To use your own custom xajax loading functions to decide what to do when xajax is making a call, and when xajax is done making a call:
xajax.loadingFunction = myCustomLoadingFunction; xajax.doneLoadingFunction = myCustomDoneLoadingFunction;
Or to display the contents of a div (with an id say of 'loadingBar'):
xajax.loadingFunction = function(){xajax.$('loadingBar').style.display='block';};
xajax.doneLoadingFunction = function(){xajax.$('loadingBar').style.display='none';};
- xajax.viewSource() function, which returns the source of the page after it has been edited by xajax commands.
- Added an additional layer of ActiveX checking for the request object and further IE memory leak fixes.
- Added a third optional argument to getFormValues so a prefix can be used to filter form elements (thanks to simeonbeta2).
- Added additional fallback layer for xajax.$ and IE using document.all.
- xajax notifies you when you have whitespace in your XML response that would invalidate your XML as a starting point for helping you to debug your XML responses.
- Added the additional XML response processing necessary for Opera to handle huge responses.
- Added XML processing checks for whitespace in your response and tells you accordingly.
- Some debugging code in replacement of the old "[Object Error]" messages tells you what error occurred and what command you were running at the time to cause it - generally occurs when there's a Javascript error in your code.
- Fixed a bug that prevented attributes from being set to string '0' or integer 0 when they were previously blank.
- Added code to handle HTTP error status returns (i. e., a catch-all for anything other than 200 OK)
- IceBrowser support. (Never heard of it, but now we support it)
- Some code changes to make the Javascript run faster.