Ajax works on localhost, but not in remote! |
[eluser]g2r[/eluser]
I've this problem whit my ajax script. In localhost all works fine, I can send the post data and receive the response from the controller, but when I've transferred all in my remote server It don't work. I've tried with changing the $config['uri_protocol'], but nothing! I don't know why It happens. When I check with alert, on ajax callback function I get only an empty window. It's strange... any ideas?
[eluser]g2r[/eluser]
Yes.. This is my [removed] Code: $('#nextBtn a').click(function(){ and in the controller: Code: function nextImg(){ 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.
[eluser]g2r[/eluser]
[quote author="Satlavida" date="1297370803"]Try using base_url()[/quote] Thanks...but don't works. I'm sure that the javascript invokes the controller, but nothing comes back. I'm very confused!
[eluser]g2r[/eluser]
I solved it! I should use the exit() to return the response. The solution was here... http://ellislab.com/forums/viewthread/135490/#668459 Thanks |
Welcome Guest, Not a member yet? Register Sign In |