AccDataGrid - A library for ajax paginated tables by Albert Coronado
Overview
Una librerķa simple para presentar datos paginados. Ahora solo hay que concentrarse en los datos.
Download
AJAX JS file accAjax.js (File necessary to run)
CSS file accDataGrid1.css
JS file accDataGrid1.js
TXT example data file data.txt
PHP example data file data.php (Zip compressed)
Example
The code
<html>
<head>
<link rel="stylesheet" href="accDataGrid/accDataGrid1.css" type="text/css" />
<script type="text/javascript" src="accDataGrid/accAjax.js"></script>
<script type="text/javascript" src="accDataGrid/accDataGrid1.js"></script>
</head>
<body>
<table cellspacing=0 class="llistaDades" id="taulaDades"></table>
<script>
var ldades=document.getElementById("taulaDades");
accDataGrid( ldades );
ldades.regByPag=10;
ldades.minRegByPag=5;
ldades.maxRegByPag=20;
ldades.stepRegByPag=5;
ldades.urlData="./data.php";
ldades.refresh();
</script>
<body>
</html>
Atributes and Methods
Atributes
String urlData
int order
String ["ASC"|"DESC"] orderDir
int pag
int regByPag
int minRegByPag
int maxRegByPag
int stepRegByPag
Methods
void writeTable( t )
void clear()
TBODY getContent()
String getValue( row,col )
void select( true|false )
array getSelectedRows()
void refresh()
AJAX Messages
Each call from accTable to data file URL contains this parameters:
pag=0 # Page Number
order=-1 # Column order
orderdir=ASC | DESC # Order direction Ascendant or descendant
regbypag=10 # Number of registers by pag
Contact
Albert Coronado Calzada

RSS News
Comments and Suggestions