Deprecated: Creation of dynamic property ext::$ajax_file is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$js_path is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$fallback is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$caching is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$ajax_view is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$debug is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$ip_debug is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$init_url is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$camelize is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$camelizeUcfirst is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$upload_dir is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$preview_url is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$ajax_file is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$js_path is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$fallback is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$caching is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$ajax_view is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$debug is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$ip_debug is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$init_url is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$camelize is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$camelizeUcfirst is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$upload_dir is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$preview_url is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: addslashes(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/core.class.php on line 1575

Deprecated: Creation of dynamic property ext::$file is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$method is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: addslashes(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/core.class.php on line 1575

Deprecated: Creation of dynamic property ext::$file is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$method is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$file is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$method is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$file is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$method is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$file is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$method is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$file is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$method is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$file is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$method is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$file is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$method is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$file is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$method is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: addslashes(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/core.class.php on line 1575

Deprecated: Creation of dynamic property ext::$file is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$method is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: addslashes(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/core.class.php on line 1575

Deprecated: Creation of dynamic property ext::$file is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: Creation of dynamic property ext::$method is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/ext.class.php on line 16

Deprecated: addslashes(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/core.class.php on line 1575

Deprecated: addslashes(): Passing null to parameter #1 ($string) of type string is deprecated in /home/project-web/cjax/htdocs/cjax/core/classes/core.class.php on line 1575
Simple ajax request binded to a button

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