The example shows how to use KoolAjax to call a PHP function from client-side.
When Calculate button is clicked, values of two first input boxes will be sent to server to be calculated.
Later the result is sent back to client and shown in last input box. All are done silently without refreshing page.
span style="color: #ff0000;">"/KoolAjax/koolajax.php";
$koolajax->scriptFolder = $KoolControlsFolder."/KoolAjax"//Enable calculate function to be called at client-side
"calculate""height:50px;padding-left:10px;""text/css">
#loading
"txtX" type="textbox" value="2" /> +
<input id="txtY" type="textbox" value="3" />
<input id="btnCal" type="button" value="Calculate" onclick="btnCal_Click()" />
<input id="txtZ" type="textbox" />
<img id="loading" src="Images/loading.gif" alt="Loading..." />
<script type="text/javascript""txtX""txtY""loading").style.visibility ="visible""txtZ""loading").style.visibility ="hidden"