CodeIgniter Forums
ajax upload theme! - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: ajax upload theme! (/showthread.php?tid=60623)



ajax upload theme! - El Forum - 05-13-2014

[eluser]Unknown[/eluser]
hi,
I'm updating a task manager done in codeigniter.
I created ajax for comunication with controller.
Code:
$('#company_id').on("change",function(e){
                //localiza o cliente
                $.ajax({
                    url:'<?=base_url() ?>projects/localizarcliente',
                    dataType: "text",  
                    cache:false,
                    type:'GET',
                    data:'email='+e.val,
                    beforeSend:function(){
                       $('#resultado').html('Lendo...');
                    },
                    success:function(data){
                        $('#resultado').html('retornou:'+data);
                    }
                });
But my function localizarcliente return theme the aplication!

Code:
function localizarcliente(){
            
            echo 'teste';
            
        }

This return:

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: widgets

Filename: theme/application.php

Line Number: 106

How i can to make for my code only return my function?