Cjax Framework


Examples

In this example there is a button you click on, and it triggers an ajax request/call. The request is routed to an ajax controller. The ajax controller goes a step further and triggers a success message, right from the back-end, and that is what you see as end result.

PHP
<?php 

        $ajax
->click("#button1",$ajax->call("ajax.php?click_ajax_request/click_button/Hello!"));
        
?>
HTML
        <input type='button' id='button1' value='Click this button to make an ajax request'>
        

Try it

As of CJAX 5.9+
PHP
<?php 

        $ajax
->click("button2",$ajax->call(array('click_ajax_request','click_button','Hello!'));
        
?>
HTML
        <input type='button' id='button2' value='Click this button to make an ajax request'>
        

Try it


Previous Topic:  Previous Class    ·   Top of Page   ·   Demos Home   ·  

CodeIgniter  ·  Copyright © 2006 - 2012  ·  Cjax