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
Dropdown input

Cjax Framework


This example is almost identical to the other example "propagate dropdown", except on this example when you select
"other..", it displays a input box, to type in.

Examples


PHP
<?php 

$ajax
->change("dropdown1",$ajax->call("ajax.php?dropdown/propagate_allow_input/|dropdown1|"),"change");

?>

Try it




Controller:
PHP
<?php 


class dropdown {
    function 
propagate_allow_input($selected)
    {
        
$ajax ajax();
        
$data = array();

        switch(
$selected) {
            case 
'options':
                
$data[] = "Option 1";
                
$data[] = "Option 2";
                
$data[] = "Option 3";
                
$data[] = "Option 4";
                
$data[] = "Option 5";
            break;
            case 
'states':

                
$data[] = "Texas";
                
$data[] = "Florida";
                
$data[] = "New York";
                
$data[] = "California";
                
$data[] = "New Mexico";
                
$data[] = "Maine";
            break;
        }

        
$ajax->select('dropdown2',$data,true);

    }
}

?>

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

CodeIgniter  ·  Copyright © 2006 - 2012  ·  Cjax