0.2 Release Notes






0.2 Release Notes

[edit] Release Notes for xajax 0.2 (stable)

These are the changes since the 0.2 beta (see below for the beta notes):

xajax.inc.php Changes

  • Added waitCursorOff() (and corresponding waitCursorOn()) so that the default behavior of showing a wait (hourglass, etc.) cursor when a request is in process is turned off.
  • Modified printJavascript and getJavascript so that a third argument can override the first two to specify the EXACT location of the xajax.js file (and by extrapolation the xajax_uncompressed.js file) independently of the URI to the file.
  • Added some output buffer cleanup right before the response output. If php is configured with output_buffering on by default, this will catch any whitespace inadvertedly output by the script. If output_buffering is off by default, then the xml will still be invalid, but if the programmer turns on debug mode, she will see a "Headers already sent" warning in the xml and be able to figure out that data is being sent before the xml response and hopefully track it down. You can override this behavior by using the new cleanBufferOff() method.

xajax_uncompressed.js Changes

  • Fixed 3 minor issues so xajax can failsafe better in non-XMLHttpRequest-aware browsers (such as IE with ActiveX turned off). (Courtesy of BigBrownChunx. See this post)
  • Added a debug alert when $("...") can't find the element with the supplied id.
  • Created getBrowserHTML() to handle the inherent problems with doing comparisons with innerHTML values. (More detailed comments in CVS if you're interested.)

[edit] Release Notes for xajax 0.2 (beta)

These are the changes since 0.1 beta4:

Package-wide Changes

  • xajax.inc.php has been split into "xajax.inc.php" (containing the xajax PHP class and related constants) and "xajaxResponse.inc.php" (which is loaded by "xajax.inc.php").
  • The Javascript component of xajax has been completely transferred over to "xajax_uncompressed.js", which is located in a sub-folder called "xajax_js". This verbose version of the Javascript code is compressed and saved to "xajax.js" (also in the "xajax_js" sub-folder) only if that file does not already exist. Note that if xajax is in debug mode, "xajax_uncompressed.js" is copied without compression to "xajax.js" on every request. The compression function is located in "xajax_js/xajaxCompress.php".
  • In order for the browser to locate the new Javascript file "xajax.js", you may need to include a relative URL to the xajax installation folder when you call the printJavascript() or getJavascript() methods. See the inline comments for details.
  • Examples have been moved to the new "examples" folder and updated to work with these codebase changes.
  • The XML structure in the xajax response output has been significantly altered. See the "xajaxResponse.inc.php" release notes for details.
  • A new folder "tests" has been created and is populated with a large number of visual browser pages testing various bits of xajax functionality. While not automated, these are useful in the same way as unit tests and will ensure that future changes to xajax don't break core functionality. You can use them to test your particular server configuration and show that xajax behaves as expected on your system.

xajax.inc.php Changes

  • Changed constants GET and POST to XAJAX_GET and XAJAX_POST.
  • Added XAJAX_DEFAULT_CHAR_ENCODING constant which is used by both "xajax.inc.php" and "xajaxResponse.inc.php" for the XML and HTTP output character encoding method by default. You can set the xajax class's encoding independently of the constant by using the setCharEncoding() method. See "xajaxResponse.inc.php" release notes for information on how its character encoding can be altered.
  • All private methods in the xajax class are now prefixed by an underscore and grouped together at the bottom of the file.
  • The methods previously marked as deprecated have been removed.
  • Added new request information methods: canProcessRequests() and getRequestMode().
  • Added registerExternalFunction() which allows you to register a function located in another PHP file. That PHP file will be included automatically by xajax prior to the function being called during a request.
  • You can now register a catch-all function via registerCatchAllFunction() to be called if the requested function cannot be found (possible if you call a different PHP file than the one which registered the functions, or if you use the alternate xajax.call() notation in the Javascript).
  • You can now register a pre-function via registerPreFunction() which gets called before the requested function.
  • All of the registering methods in xajax now support both object instance methods and static class methods in addition to regular PHP functions. Use a three-element array rather than a single string as the first argument to set up the object callback (see the inline comments for details).
  • You can now return an xajaxResponse instance directly rather than the output of its getXML() method if you wish. Either one will work the same for your function's return value.
  • Added error handling and logging. The errorHandlerOn() method turns on xajax's new custom error handler (PHP 4 and 5 compatible) which will send PHP errors down to the browser as an alert response. Optional logging of these errors can be set using the setLogFile() method.
  • If you don't want xajax to close (via the exit keyword) the entire PHP request after it processes an xajax request, use the new exitAllowedOff() method to disable that functionality.
  • Modified the _detectURI method to support more server configurations (courtesy of Gilles vd Hoven).
  • Because of its interference with many AJAX-style data transfers, xajax will now purposefully eliminate any escaped quotes if magic quotes is turned on. So beware: if you're putting data transfered via an xajax request directly into an SQL database, make sure you escape your quotes appropriately EVEN IF magic quotes is turned on.

xajaxResponse.inc.php Changes

  • The character encoding method for the XML response data will now honor the XAJAX_DEFAULT_CHAR_ENCODING constant defined in "xajax.inc.php" by default. To change a specific XML response, use the setCharEncoding() method to specify the encoding method. Note that this will be ignored when multiple XML responses are joined via the loadXML() method (see below).
  • Added loadXML() which will join the response commands of the supplied response object to the object whose method is being called. In other words, if you call loadXML on response A and pass in response B, the commands of response B will be added to response A after response A's existing commands.
  • Added addRedirect() so you can easily change the page being viewed in the client browser (courtesy of Gilles vd Hoven).
  • Added methods addEvent(), addHandler(), addRemoveHandler() which allow you to attach Javascript event code and event handlers to HTML elements dynamically.
  • Added addIncludeScript() which can instruct the client to load a new Javascript file from a URL dynamically.
  • Added addInsert() which allows you to insert a new HTML element before an existing one.
  • Added addCreateInput() and addInsertInput() which allow you to construct form controls dynamically (note that addCreate() should no longer be used for this purpose and its $sType parameter has been depricated).
  • The XML structure for each command is much simpler and highly compressed in order to cut down on transfer size. The new _cmdXML() method aids in formation of command elements and is used throught the class, and it's recommended you utilize it in your xajaxResponse subclasses (if any) as much as possible. Further details of the new XML structure will be posted on the xajax Wiki.

xajax_uncompressed.js Changes

  • xajax's Javascript component has been significantly refactored and can be used to a much greater extent as a client-side aid to dynamic DOM and script manipulation. In fact, most of xajaxResponse's commands have direct 1:1 correspondance with methods of the Xajax Javascript class. Documentation will be forthcoming.
  • The call() method is now easier to use on the client in lieu of "wrapped" functions. Usage: xajax.call("myFunctionName", ["argument1", "argument2", "etc."])
  • Changed getFormValues() so that data in disabled form controls doesn't get sent to the server by default. Set the optional second argument to true to send all form data regardless of state. Also, multiple select controls should now work in a similar manner to a standard form submit from a PHP standpoint.
  • Invalid XML responses or XML processing problems will cause error alerts to appear, making the AJAX calls easier to debug.
  • The response dialog that appears when xajax's debug mode is on is now limited to 1000 characters so IE users don't have major speed and UI issues.
  • Removed the "waiting" Javascript alert window that would come up while the request was being processed in debug mode, since it was interfering with some browsers.

air travel fare at: air travel fare auto refinance loan at: auto refinance loan best home equity at: best home equity debt collector at: debt collector debt problem at: debt problem eliminate credit card debt at: eliminate credit card debt leather sofa at: leather sofa modern sofa at: modern sofa nationwide mortgage at: nationwide mortgage online debt at: online debt sofa express at: sofa express state farm life insurance at: state farm life insurance 2nd mortgage at: 2nd mortgage advance cash loan at: advance cash loan air mattress at: air mattress air travel at: air travel air travel discount at: air travel discount airline reservation at: airline reservation airline tickets at: airline tickets antique furniture at: antique furniture auto insurance at: auto insurance auto insurance quote at: auto insurance quote auto loan calculator at: auto loan calculator automobil insurance at: automobil insurance baby furniture at: baby furniture bad credit auto loan at: bad credit auto loan bad credit loan at: bad credit loan bad credit mortgage at: bad credit mortgage bedroom furniture at: bedroom furniture best mortgage rate at: best mortgage rate business debt at: business debt california mortgage at: california mortgage car insurance at: car insurance commercial mortgage at: commercial mortgage computer furniture at: computer furniture consolidate debt at: consolidate debt contemporary furniture at: contemporary furniture continental airline at: continental airline credit card debt at: credit card debt debt collection at: debt collection debt consolidation at: debt consolidation debt consolidation loan at: debt consolidation loan debt counseling at: debt counseling debt help at: debt help debt management at: debt management debt reduction at: debt reduction debt relief at: debt relief debt settlement at: debt settlement debt solution at: debt solution dental insurance at: dental insurance discount airline tickets at: discount airline tickets discount furniture at: discount furniture discount mattress at: discount mattress electric heater at: electric heater fast cash loan at: fast cash loan furniture kid at: furniture kid furniture modern at: furniture modern furniture store at: furniture store garden furniture at: garden furniture gas heater at: gas heater health insurance at: health insurance home equity loan at: home equity loan home improvement loan at: home improvement loan home insurance at: home insurance home mortgage at: home mortgage insurance leads at: insurance leads kerosene heater at: kerosene heater kitchen furniture at: kitchen furniture life insurance at: life insurance loan consolidation at: loan consolidation loan with bad credit at: loan with bad credit medical insurance at: medical insurance mortgage calculator at: mortgage calculator mortgage lead at: mortgage lead mortgage loan at: mortgage loan mortgage quote at: mortgage quote office furniture at: office furniture outdoor furniture at: outdoor furniture patio furniture at: patio furniture patio heater at: patio heater portable heater at: portable heater propane heater at: propane heater refinance mortgage at: refinance mortgage second mortgage at: second mortgage sectional sofa at: sectional sofa sleeper sofa at: sleeper sofa sofa bed at: sofa bed space heaters at: space heaters term life insurance at: term life insurance travel insurance at: travel insurance unsecured loan at: unsecured loan water heater at: water heater wheel chair at: wheel chair whole life insurance at: whole life insurance business insurance at: business insurance business loan at: business loan cash loan at: cash loan base business home at: base business home business home opportunity at: business home opportunity business home internet at: business home internet business home idea at: business home idea business home work at: business home work business home online at: business home online best business home at: best business home business home start at: business home start business home small at: business home small business computer home at: business computer home fruits basket at: fruits basket visa credit card at: visa credit card starting a business at: starting a business small business at: small business job opportunity at: job opportunity investment opportunity at: investment opportunity internet business at: internet business home based business at: home based business franchise sale at: franchise sale franchise opportunity at: franchise opportunity employment opportunity at: employment opportunity career opportunity at: career opportunity business travel at: business travel business to business at: business to business business software at: business software business services at: business services business school at: business school business resource at: business resource business plan at: business plan business opportunity at: business opportunity business franchise at: business franchise business for sale at: business for sale business degree at: business degree business credit card at: business credit card business check at: business check business card at: business card business and economy at: business and economy better business bureau at: better business bureau housing market at: housing market corporate housing at: corporate housing senior housing at: senior housing affordable housing at: affordable housing rental housing at: rental housing temporary housing at: temporary housing housing prices at: housing prices affordable dentures at: affordable dentures affordable apartment at: affordable apartment stock trading at: stock trading stock market at: stock market stock quote at: stock quote trade stock at: trade stock stock broker at: stock broker buy stock at: buy stock stock exchange at: stock exchange stock investment at: stock investment alternative bankruptcy at: alternative bankruptcy attorney legal services at: attorney legal services avoid bankruptcy at: avoid bankruptcy bankruptcy services at: bankruptcy services dwi attorney at: dwi attorney attorney injury personal at: attorney injury personal banking investment at: banking investment bankruptcy attorney at: bankruptcy attorney bankruptcy card credit at: bankruptcy card credit bankruptcy filing at: bankruptcy filing bankruptcy law at: bankruptcy law bankruptcy loan at: bankruptcy loan bankruptcy personal at: bankruptcy personal credit equity home line at: credit equity home line estate investment real at: estate investment real fidelity investment at: fidelity investment finance investment at: finance investment investment online at: investment online investment property at: investment property personal injury attorney at: personal injury attorney arizona home new at: arizona home new arizona lottery at: arizona lottery atlanta georgia real estate at: atlanta georgia real estate colorado home loan at: colorado home loan colorado lottery at: colorado lottery connecticut lottery at: connecticut lottery hawaii car rental at: hawaii car rental hawaii mortgage at: hawaii mortgage indiana mortgage at: indiana mortgage iowa attorney at: iowa attorney iowa travel at: iowa travel lottery maryland at: lottery maryland airline alaska at: airline alaska alabama lawyer at: alabama lawyer alabama real estate at: alabama real estate alaska cruise at: alaska cruise alaska estate real at: alaska estate real alaska travel at: alaska travel alaska vacation at: alaska vacation arizona estate real at: arizona estate real arizona mortgage at: arizona mortgage arkansas real estate at: arkansas real estate california car insurance at: california car insurance california lottery at: california lottery california mortgage loan at: california mortgage loan california real estate at: california real estate casino louisiana at: casino louisiana colorado college at: colorado college colorado real estate at: colorado real estate colorado vacation at: colorado vacation connecticut college at: connecticut college connecticut real estate at: connecticut real estate delaware estate real at: delaware estate real estate maine real at: estate maine real estate maryland real at: estate maryland real florida lottery at: florida lottery florida mortgage at: florida mortgage florida real estate at: florida real estate florida travel at: florida travel florida vacation at: florida vacation hawaii cruise at: hawaii cruise hawaii hotel at: hawaii hotel hawaii real estate at: hawaii real estate hawaii travel at: hawaii travel hawaii vacation at: hawaii vacation hotel california at: hotel california idaho real estate at: idaho real estate illinois real estate at: illinois real estate indiana casino at: indiana casino indiana real estate at: indiana real estate iowa real estate at: iowa real estate kansas real estate at: kansas real estate kentucky real estate at: kentucky real estate louisiana real estate at: louisiana real estate maryland mortgage at: maryland mortgage massachusetts real estate at: massachusetts real estate italian airline at: italian airline italian charm bracelet at: italian charm bracelet italian charm wholesale at: italian charm wholesale italian charm at: italian charm italian consulate at: italian consulate italian food at: italian food italian furniture at: italian furniture italian gift at: italian gift italian greyhound at: italian greyhound italian jewelry at: italian jewelry italian leather at: italian leather italian pottery at: italian pottery italian recipes at: italian recipes italian restaurant at: italian restaurant italian shoes at: italian shoes italian villa rental at: italian villa rental italian wine at: italian wine