PRAjax

PRAjax - PHP Reflected Ajax

Welcome to PRAjax!

The PRAjax class can be used to reflect PHP code into JavaScript and Ajax methods and vice-versa.

The following features make this library worth using:

  • Allows easier Ajax programming with PHP
  • PHP functions and objects can be reflected to JavaScript
  • PHP objects can be used in JavaScript, both properties and (registered) functions
  • PRAjax creates all wrappers for the developer
  • Automatic conversion of return values and parameters between PHP and JavaScript
Changelog
PRAjax Changelog:
-----------------

v1.2.8 (31/10/2006):
- Bugfix: (SF #1587505) Status IFrame sometimes on top of DIV is better now, not fixed due to slow JS execution in IE
- Bugfix: (SF #1587716) IFrame fallback null-reference fixed

v1.2.7 (30/10/2006):
- Bugfix: (SF #1586433) ShowStatusId
- Bugfix: Internet Explorer as well as Firefox seemed to have memory leaks when attaching and detaching anonymous functions. This has been fixed.
- Bugfix: prajax_transport.js IFrame fallback sometimes throwed an error in Firefox
- Bugfix: prajax_component_updatepanel.js sometimes did not refresh every DIV marked for update
- PRAjax now unregisters all events on document.unload to prevent memory leaks
- prajax_component_updatepanel.js now replaces DOM elements instead of innerHTML
- prajax_util.js contains a subclass for caching event handlers
- prajax_util.js contains extra methods for event handling

v1.2.6 (30/08/2006):
- PRAjax now supports dynamic loading of additional server-side PRAjax libraries. These must inherit from PRAjax_DynamicLibrary !
- prajax_component_updatepanel.js now also has a server-side class PRAjax_Component_UpdatePanel which is loaded dynamically when needed
- prajax_component_updatepanel.js adds a query parameter telling PRAjax to load PRAjax_Component_UpdatePanel
- PRAjax_Component_UpdatePanel supports returning partial page content instead of the full page
- Changed build procedure

v1.2.5 (23/08/2006):
- Changed license to LGPL and included LGPL license text
- PRAjaxUtil now contains a method to return form contents as an array
- prajax_component_suggest.js now uses PRAjaxUtil methods
- PRAjaxUtil supports deleteEvent
- PRAjaxUtil supports getFormValues
- New component: prajax_component_updatepanel.js, see manual for functionality

v1.2.4 (17/08/2006):
- Bugfix: prajax.js could not execute a class method
- Bugfix: prajax.php sometimes returned errors or warning when rendering JavaScript
- Bugfix: PRAjax now supports all character sets, this was caused by JavaScript escape(). Replaced this to encodeURIComponent(). (Thank you Sigurd for reporting!)
- PRAjax.php now contains a method getCharset and setCharset. Default charset is now UTF-8 !
- PRAjax->GetJavaScript now outputs 100% valid XHTML code

v1.2.3 (10/08/2006):
- Bugfix: prajax_transfer.js did not always fallback to IFrame correctly (typo in a variable name)
- prajax_transfer.js now falls back to IFrame when more than 2 XMLHttpRequests are waiting for data at the same time

v1.2.2 (28/07/2006):
- Removed separate client-side core function PRAjax.ObjectCall and refactored to use PRAjax.Call in all situations
- PRAjax.Nothing does not have to be specified when no callback function is needed. PRAjax determines this for itself.
- Client-to-server calls can now be made to another script than the originating script. Check example_target.php for examples. Make sure you do register the PRAjax functions on the caller page! Beware when using objects: they must be known on the current page!
- PRAjax.php now contains a property "isAjaxCall()" to check if the current call is Ajax or regular
- Refactored prajax.js to prajax.js, prajax_transfer.js and prajax_util.js and modified build.bat for this
- PRAjax can now use an external transport instead of the built-in one. Check the example example_helloworld_prototype.php for an example using prototype.js transport

v1.2.1 (25/07/2006):
- Added client-side function PRAjax.Nothing to have an empty function when no server return value is needed
- Bugfix: PRAjax->Alert() seemed broken since a few versions back
- Bugfix: PRAjax->ExecuteScript() seemed broken since a few versions back
- Added PRAjax->AddScript() to add a .js script to the client page
- Added /arameter $pEcho to PRAjax->GetJavaScript(), to be able to fetch the client script into a variable instead of a direct echo
- Bugfix: removed a client-side bug: In prajax_component_suggest.js, the form submission bug from v1.2.0 was not fully fixed. This has been solved by returning false in some anonymous functions.
- Added a client-side IFrame fallback instead of XMLHttpRequest

v1.2.0 (20/07/2006):
- Transfer of data is now done with JSON
- Bugfix: Firefox sometimes can not read out XMLHttpRequest() status and throws NS_ERROR_NOT_AVAILABLE, leaving fetched information behind... v1.1.3's fix for recycling objects has been removed.
- Bugfix: removed a client-side bug: In prajax_component_suggest.js, Firefox submitted the form when pressing enter. This has been solved by cancelling parent events.
- Bugfix: IE7 beta 3's native XMLHttpRequest() object is case-sensitive, this has been fixed. (http://sleepyhead81.blogspot.com/2006/07/xmlhttprequest-in-ie7-case-sensitive.html)
- Added a random value to each request to suppress browser caches that do not understand no-cache HTTP headers
- Created a build.bat file for building PRAjax to bin/, use files there instead of src/
- Minified JavaScript files for smaller download size
- Added a short tutorial

v1.1.4 (13/06/2006):
- Bugfix: Firefox did not seem to like div.value, and preferred div.getAttribute('value') in the prajax_suggestcomponent

v1.1.3 (09/06/2006):
- When using the native XMLHttpRequest() object, performance increases: XMLHttpRequest() can be re-used for the lifetime of the page (see http://blogs.msdn.com/ie/archive/2006/6/8.aspx)

v1.1.2 (24/03/2006):
- Bugfix: removed a client-side bug: In prajax_component_suggest.js, a null-reference exception is now solved
- Bugfix: removed a client-side bug: In prajax_component_suggest.js, after pressing enter/return, form is no longer submitted when inside a suggest list
- Checked compatibility on IE7.0 beta 2 preview, works fine
- Added numerous "wait" images for use in your own applications
- Auto-appended a hidden iframe to client "prajax_status"-div, to allow overlaying on certain page elements
- Refactored prajax_component_suggest.js: moved GetLeft and GetTop to PRAjax object
- Improved prajax_component_suggest.js up and down arrow behaviour
- prajax_component_suggest.js is now mature
- Removed example_suggest.php in favour of example_component_suggest.php

v1.1.1 (15/03/2006):
- Added a JavaScript widget/component to facilitate the use of auto-suggest-like applications. View the example "example_component_suggest.php" for integration examples.

v1.1.0 (10/03/2006):
- Changed version numbering to major, minor, revision
- Version 1.1.x not compatible with versions prior to 1.1.0
- Dropped support for GET, only POST is allowed from now on
- Added function ShowWaitCursor to display a wait cursor when busy
- Several code performance enhancements
- Moved almost all client-side JavaScript code to a separate file
- Bugfix: Removed a bug: Boolean values are processed correctly now
- Bugfix: Removed a client-side bug: XMLHttpRequest() was called without "new", making PRAjax useless in Firefox

v1.07 (17/02/2006):
- rawurlencode() has been added to the PRAjax return value

v1.06 (26/01/2006):
- XMLHttpRequest object now set to null after being finished to prevent memory leaks

v1.05 (23/01/2006):
- Fixed a bug when nesting single and double quotes

v1.04 (20/01/2006):
- Fixed a bug when sending a boolean from JS to PHP

v1.03 (13/01/2006):
- Fixed some small bugs with null and zero values
- Added support for Miscrosoft IIS server variables

v1.02 (22/12/2005):
- Added functionality to register class functions
            


Copyright © 2005-2006, Maarten Balliauw