Monday, March 30, 2015

Ajax request , response using jQuery

Ajax request , response using jQuery


<a onclick="callController();" href="javascript:void(0)">View More Articles</a>

<script type="text/javascript">
function callController(){
    
       new Ajax.Request("REQUEST FILE PATH HERE", {
           method: 'Post',
           parameters: {"pg_num":"<?php echo '1';?>"},
           onComplete: function(transport) {
            alert(transport.responseText);
           }
       });
   }
</script>

No comments :

Post a Comment