Recommend this page to a friend! |
Download .zip |
Info | View files (11) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2009-10-13 (7 years ago) | Not enough user ratings | Total: 844 | All time: 3,954 This week: 1,002 |
Version | License | PHP version | Categories | |||
dab_ajax_toolkit 1.0 | Freeware | 5.0 | PHP 5, Databases, AJAX |
Description | Author | |
This package can be used to auto-complete form fields with data retrieved from an Oracle database. |
AJAX toolkit was created to auto complete other elements into a html document. It was firstly designed for situations when you have some fields that must be filled when the user types something in some field ( like a primary key field ) and this field lost the focus ( onblur event ). in your View.html the sql is a md5 key. why? it's used to not allow client to see your sql code and do modifications to obtain some privilleges. To get your MD5 key, you must get your SQL defined at AjaxQueries.class.php and apply php md5( "select f1, f2, ..., fn from table" ). Each SQL defined at AjaxQueries.class.php must have an index like follows: $v[ 1 ] = "select nm_contato, telefone from contato"; For javascript you must use: sql = "1:afe8133bd534f4a04e1222c913b735f7"; This AJAX toolkit is defined to be used with Oracle Databases. But to change it, is easy. The steps to change it follows below: 1 - create a valid connection with your database in your Controller script ( Controller does not need to be named like this. It's only used for examples ) 2 - modify your SQL statement at AjaxQueries.class.php to match to your DB 3 - change lines greater than 82 and stop using oci functions. This Ajax toolkit was implemented with Oracle and oci php functions. This is the first version and other releases must use some more generic such as PDO or ADODB or something like that. If someone wants to contribute, there is no problem. Fixed Classes that does not need modifications --------------------------------------------------- AjaxControlFiltler.class.php AjaxFilter.class.php AjaxFormat.class.php AjaxOptionsValidator.interface.php AjaxQueries.class.php must be modified to acomodate your queries Examples: ----------------------- View.html - document with html fields and needed javascript to send requests and manage response from server Controller.php - server side script to deal with View requests/responses BusValidator.example.php - example of customized validator Dependencies ---------------------- JSON - JavaScript Object Notation extension Javascript scritps ------------------------ tkajax.js defines 3 global variables that must be used by your customized javascripts like used in View.html - these variables must be references to some JS "objects" - you will create instances for it _ajaxobject => TKAjax _ajaxresultjsontext => the result from server - JSON encoded _ajaxcallbackresult => your function to treat responses from server website: aeloy.blogspot.com |
Files |
File | Role | Description | ||
---|---|---|---|---|
js (2 files) | ||||
AjaxControlFiller.class.php | Class | The main class | ||
README | Doc. | readme | ||
View.html | Data | view mode | ||
Controller.php | Example | example of a controller | ||
BusValidator.example.php | Class | customized option validator | ||
AjaxQueries.class.php | Class | Class with your SQL statements | ||
AjaxOptionsValidator.interface.php | Class | Interface for customized options validators | ||
AjaxFormat.class.php | Class | Class to format data for SQL statements | ||
AjaxFilter.class.php | Class | class that define filters, results and SQL to be executed |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
0% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.