title: Ajax not being called in javascript function
body: <p>In the success function I want to call a function. The problem is that ajax does not fire, so the data is never triggered and display. Here is my ajax call with a javascript function call in the success function.</p>
  
  <pre><code>$.ajax({
      type: "POST",
      url: "./api/login.php",
      data: dataString,
      cache: false,
      success: function(data){
          if(data){
              //FUNCTION CALL WHEN USER LOGGING IN
              retrieveUserBlogData();
  
              window.location = "api/home.php";
          }else{
              $('.alert').show();
  
          }
      }
  });
  
  function retrieveUserBlogData(){
      $.ajax({
          type: "GET",
          url: 'retrievePostData.php',          
          data: "",
          dataType: 'json',      
          success: handleData
      });
  }
  
  function handleData(data) {
      alert(data);
  
      var blog_file = data[3];            
      $('#imageDiv')
      .append('&lt;img id="blog_img" src="upload/' +     blog_file + '"&gt;&lt;br&gt;');
  }
  </code></pre>
  
  <p>I cant figure out why the ajax in the retrieveUserBlogData() function is not being triggered.
  Any help would be appreciated Thanks.</p>