Welcome Guest, Not a member yet? Register   Sign In
Unable to get jquery ajax working
#3

[eluser]Thorpe Obazee[/eluser]
Do you have firebug installed? if you have firebug installed, it would be easy to see if you're pointing to a 404 page?

Anyway, you should have

Code:
$(document).ready(function(){
  $(”.button”).click(function(){
      $.post('<?php echo site_url('welcome/get_messages');?>’, {ajax:'true'},
      function(data){
          alert(data);
      }, ‘json’);
    });
});

You might also be interested in this post:

jquery and ajax


Messages In This Thread
Unable to get jquery ajax working - by El Forum - 04-22-2010, 03:40 PM
Unable to get jquery ajax working - by El Forum - 04-22-2010, 04:30 PM
Unable to get jquery ajax working - by El Forum - 04-22-2010, 05:08 PM
Unable to get jquery ajax working - by El Forum - 04-22-2010, 05:20 PM
Unable to get jquery ajax working - by El Forum - 04-22-2010, 05:29 PM
Unable to get jquery ajax working - by El Forum - 04-23-2010, 09:11 AM
Unable to get jquery ajax working - by El Forum - 04-23-2010, 10:34 AM
Unable to get jquery ajax working - by El Forum - 04-23-2010, 12:56 PM
Unable to get jquery ajax working - by El Forum - 04-23-2010, 01:15 PM
Unable to get jquery ajax working - by El Forum - 04-23-2010, 01:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB