JustAJAX.com
  ajax components

Lightweight and Clear
Ajax Components

Javascript Ajax Grid Quick Start

Quick Start

I. Download and unzip the JustAjax Table trial package.

II. Run sample.html with your browser. Javascript Ajax Grid will load data from remote MySQL table using http://justajax.com/data/demo/index.php as a server side script.

How to View ANY of Your MySQL Table with JustAjax Table?

It's easy!
For example, you have MySQL database "my_base" with table "my_table" and the domain "mydomain.com" on your server.

1. Find /server/index.php in unzipped Javascript Ajax Grid trial package and edit:

       $_db = array (
         'host' => 'localhost',
         'user' => 'my_user',
         'password' => 'my_password',
         'database' => 'my_base'
   );

   // permitted tables
   $poss_tables = array(
     //table
     'my_table' => array(
         //parameters for 'my_table'
         'hidden_columns' => array('hidden_column'),
         'editable'       => true,
         'disrows'        => array('authors_id'),
         'filter'         => true,
         'adding'         => true,
         'deleting'       => true       
     ),
     'table_1' => array()
   );


The description of parameters:

'my_table', 'table_1' - table's names;
'hidden_columns' - array with hidden fields;
'editable' - opportunity to edit the table.
( true - editing is possible, false - editing is forbidden).
Default value: false;
'disrows' - array of the fields forbidden for editing;
'filter' - enable/disable use of the filter.
Default value: true;
'adding' - enable/disable addition of new records.
Default value: false;
'deleting' - enable/disable deletion of records.
Default value: false;

2. Upload "server" directory from Javascript Ajax Grid trial package to your server, for example to http://mydomain.com/server/, so the url to index.php will be http://mydomain.com/server/index.php

3. Edit the following part of sample.html:

 
     window.onload = function(){
         
         var _table = new justAjaxTable( {
            'main'  : document.getElementById('table-area'),
            'dbtable' : 'my_table',
            'url'  : 'http://mydomain.com/server/index.php'} );
      };


where
'my_table' is a name of your table and 'http://mydomain.com/server/index.php' is a url of your uploaded server-side php script.

4. Open sample.html with your browser. That's it!
Javascript Ajax Grid will enable you to view, edit, sort, scroll, and filter your table w/o any additional line of code!

©2019 JustAjax.com


ajax table grid documentation | javascript ajax grid quick start |  ajax dynamic table purchase | javascript editable grid license