Get KoolPHP UI with 30% OFF!

Any KoolAJAX call reloads all the sql queries in related cakephp controller

Keyur
I am using KoolGrid and KoolAJAX with CakePHP and I am getting some pre-required from cakephp controller via models for that view files. No problem is when i do any AJAX call it reloads whole view file which reloads related controller and so controller is reloading all those sqls again. Is there any way to ask AJAX not to reload the whole page, else it's just slowing down our web application by doing these useless SQL calls.In JavaScript I am doing:[code]$count_result = koolajax.callback(set_product_session($productID, $gridRowData, $value, $field, $limit));Which calls this AJAX call:function set_product_session($productID, $gridRowData, $value, $field, $limit){ session_start(); if(stristr($field, "amazon_platinum_keywords")) { $_SESSION["product_fields"][$productID]["amazon_platinum_keywords"][$field] = $value; } else { $_SESSION["product_fields"][$productID][$field] = $value; } if($limit != 0 && strlen($value) > $limit) { return FALSE; } else return true;}$koolajax->enableFunction("set_product_session");
Posted Aug 4, 2015 Kool
David
Hi Keyur,
Could you try to change the callback call to some thing like this and see what happens:
$count_result = koolajax.callback(set_product_session($productID, $gridRowData, $value, $field, $limit), onDone);
function onDone() { }
Rgds,
Posted Aug 5, 2015 Kool
Keyur
It does same thing again no change.
Posted Aug 5, 2015 Kool
Mary
Hello! In the modern world, the BOT model is becoming very popular, especially in the field of information technology. Our company invites you to discover new opportunities for your business! Our outsourcing company uses advanced technology and the BOT model to create innovative projects! >> https://www.bot-ukraine.com/bot-contracts/
Posted Apr 15, 2023 Kool