PHP Classes

Modified Version of xajaxGrid

Recommend this page to a friend!

      XAJAX Grid  >  All threads  >  Modified Version of xajaxGrid  >  (Un) Subscribe thread alerts  
Subject:Modified Version of xajaxGrid
Summary:Have made some enhancements for portability and flexibility
Author:Robert Jinksamona
Date:2010-04-29 18:11:56

  1. Modified Version of xajaxGrid   Reply   Report abuse  
Picture of Robert Jinksamona Robert Jinksamona - 2010-04-29 18:11:56
I have been tinkering with this class ( for a couple of days, making some things more portable and flexible - adding the option to use POST instead of GET to call the routines, and to allow the user to specify custom names for the ajax callbacks that service this routine, in case the javascript function names are already in use (for common ones such as 'xajax_edit' this might cause troubles - so this eliminates that problem). Also, I have made it so that the object can call a specific custom div, in order to allow for multiple instances of this object on a single page.

Below are class properties that I added, all of which are part of the new functionality. This modified class *should* be able to work in place of the existing classes with nothing broken, but one might want to test it if they were going to look at this. A link to the fully modified script can be downloaded at: ...

New variables:
* @var use_post allows us to specify POST methods to pass the data
var $use_post = 0;
* @var formname allows us to set a form variable to use multiple xajaxGrid windows in a single page
* and to use POST methods to pass the data
var $formname = '';
* @var ***_script variables allow us to customize the methods that are used to call the various callbacks
* in case such common names as 'xajax_edit' are used already
var $edit_funcjs = 'xajax_edit';
var $add_funcjs = 'xajax_add';
var $delete_funcjs = 'xajax_delete';
var $show_funcjs = 'xajax_showGrid';
* @var read_only - whether or not to show the edit and delete buttons
var $read_only = 0;
* @var edtext, deltext - language specifics
var $edtext = 'Editar';
var $deltext = 'Borrar';
* @var img_url - URL path to image dir
var $img_url = 'images';