Welcome Guest, Not a member yet? Register   Sign In
I can't get the responce for ajax post call.
#1

[eluser]chefnelone[/eluser]
Hello.

I can't get the responce for ajax post call.(using jquery).
But this problem just happens in the remote server. In my locallhost works fine. :ohh:

I have the form:
Code:
<form id='test'>
<input type="text" name="xxx" value="test" />
<input type="submit" value="enviar"/>
</form>

the js:
Code:
$(document).ready(function() {
  $('#test').submit(function(eve) {
  eve.preventDefault();
     $.post('/shop/test' , $(this).serialize() , function(html){
     alert(html);
     //I can't get 'html' which should contain "Data from the method" text

  });
});

and the method in shop controller:
Code:
function test()
        {
            $data = "Data from the method";
                echo $data;
                $this->firephp->log( $data);
                // I get this, so the method is called from the javascript
        }

I cant's spot the mistake. ..


Messages In This Thread
I can't get the responce for ajax post call. - by El Forum - 02-11-2010, 09:25 AM
I can't get the responce for ajax post call. - by El Forum - 02-11-2010, 09:28 AM
I can't get the responce for ajax post call. - by El Forum - 02-11-2010, 09:48 AM
I can't get the responce for ajax post call. - by El Forum - 02-11-2010, 02:16 PM
I can't get the responce for ajax post call. - by El Forum - 02-11-2010, 02:36 PM
I can't get the responce for ajax post call. - by El Forum - 02-11-2010, 03:15 PM
I can't get the responce for ajax post call. - by El Forum - 02-11-2010, 06:32 PM
I can't get the responce for ajax post call. - by El Forum - 02-12-2010, 02:22 AM
I can't get the responce for ajax post call. - by El Forum - 11-27-2010, 03:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB