Jquery Multiple ajax call

Posted by Mehmet MERCAN on Stack Overflow See other posts from Stack Overflow or by Mehmet MERCAN
Published on 2010-04-04T22:18:33Z Indexed on 2010/04/04 22:23 UTC
Read the original article Hit count: 664

Filed under:
|
|
|
|

I have a listed navigation with letters and i am trying to call the actors and directors from different json files when the user clicked a letter. I used 2 ajax calls to get the data from actor.php and director.php. It works fine on my local machine, but only the first one works on server. How can i make each ajax calls working?

$(document).ready(function(){
    $('.letters').click( function(){
         var letter=$(this).html();

     $.ajax({
       url: 'actor.php?harf='+letter,
       dataType: 'json',
       success: function(JSON) 
                 {  //some code   }
               }); 


     $.ajax({
       url: 'director.php?harf='+letter,
       dataType: 'json',
       success: function(JSON) 
              {  // some code     }
     }); });  });

© Stack Overflow or respective owner

Related posts about multiple

Related posts about AJAX