Welcome Guest, Not a member yet? Register   Sign In
Ajax works on localhost, but not in remote!
#3

[eluser]g2r[/eluser]
Yes..

This is my [removed]

Code:
$('#nextBtn a').click(function(){  
                     var num = $('#gallery_slider img').attr("alt");            
                         $('#gallery_slider img').fadeOut('slow');
                       $("#gallery_slider li").remove();
                         $.post('<?=site_url('/home/nextImg') ?>',{next:num},function (data){  
                       $("#gallery_slider ul").append("<li><img alt='"+ data.alter +"' src='"+ data.path + "' /><li>").show('slow');
                     },"json");  
                })  ;   // end next


and in the controller:

Code:
function nextImg(){    
                        
                        $next=$this->post('next');
                        $this->load->model('MGallery');
                            $res = $this->MGallery->scaNext($next);
                        echo $res;  
    }


I've tried with firebug and I can see that the post value is sent, but I can't get any response from controller.
I've also used to encode in json the return values, but nothing.


Messages In This Thread
Ajax works on localhost, but not in remote! - by El Forum - 02-10-2011, 07:14 AM
Ajax works on localhost, but not in remote! - by El Forum - 02-10-2011, 08:29 AM
Ajax works on localhost, but not in remote! - by El Forum - 02-10-2011, 08:41 AM
Ajax works on localhost, but not in remote! - by El Forum - 02-10-2011, 08:46 AM
Ajax works on localhost, but not in remote! - by El Forum - 02-10-2011, 09:04 AM
Ajax works on localhost, but not in remote! - by El Forum - 02-10-2011, 11:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB