Problem implementing KoolPHPSuite
PermalinkWebpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)
Timestamp: Wed, 10 Mar 2010 13:55:14 UTC
Message: 'KoolUpdatePanel' is undefined
Line: 102
Char: 1
Code: 0
URI:http://localhost/concrete5/index.php/example2/...
The code for the example single page is:
<?php require "KoolControls/KoolAjax/koolajax.php"; //KoolGrid requires KoolAjax to make ajax call. require "KoolControls/KoolGrid/koolgrid.php"; $koolajax->scriptFolder = "KoolControls/KoolAjax";//Set script folder //Create database connection $db_con = mysql_connect("localhost","root","pass"); mysql_select_db("concrete5",$db_con); // Create DataSource $ds = new MySQLDataSource($db_con); $ds->SelectCommand = "select customerNumber,customerName,phone,city from koolphpsuite_customers"; //Initiate Grid $grid = new KoolGrid("grid"); $grid->scriptFolder = "KoolControls/KoolGrid";//Set script folder $grid->DataSource = $ds; $grid->AjaxEnabled = true;
I have placed the folder containing the KoolPHPSuite in the single_pages folder. I originally tried to add that folder in the libraries directory, but realized that when the controls are implemented, they require references to the directory structure, so decided it was easier just to put the KoolPHPSuite in the single_pages directory.
Any help is greatly appreciated.
Thanks,
Adam
stick that KoolControls folder in /tools
then use this instead of the require
$tl = Loader::tool('KoolControls/KoolAjax/koolajax');
i also suggest you use the built in c5 function for the db, also put the defined c5 or die at the top
Could you give an example of how to use Loader::tool? How would I go about referencing the directory in the code below:
$koolajax->scriptFolder = "KoolControls/KoolAjax";//Set script folder
Thanks,
Adam
Thanks for the suggestion, but doesn't help my grid load correctly, and, it messes up the images that load on the home page. Would you happen to have any other ideas?
Thanks,
Adam
1. Don't use jQuery? Don't load it!