javascript - jquery $.ajax() not working in application hosted server -


i working on ci app...having little bit problem in jquery $.ajax.its working fine in localhost in hosted server of time not working

<?php $this->load->helper('url'); ?> var generate = '<?php echo site_url('pingenerator'); ?>';  function generate_pin(){         alert(generate);//testing purpose           var package = $("#packagetype").val();         var times = $("#noofpins").val();     $.ajax({         'url' : generate,         'type' : 'post',         'data' : {'packagetype' : package,'noofpins' : times },         'success' : function(data){             var container = $('#pin_generator_msg');                    alert('ajax complete');//testing purpose                  container.html(data);             }     }); } 

url works fine when copy peasting in add bar... $.ajax not calling @ all


adding both scripts jquery-1.10.2.min.js , jquery.smarttab.min.js causing no problem type , post without passing data.

if pass data type calling javascript file showing home page in display part. script.js not added in problem causing context

calling link: http://skylabsinc.in/pages/index.php/js/script.js

if pass data type post calling,causing error

post http://skylabsinc.in/pages/index.php/pingenerator [http/1.1 500 internal server error 831ms]

  1. check jquery.js, whether included correctly.
  2. check jquery.js version. may older version
  3. check in firebug's console mode , post error.

what error getting? if tell helpful.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -