title: how to call a ajax function automatically after reloading the page
body: <p>I have ajax function like this:</p>
  
  <pre><code>  $("#noOfFollowing").click(function(){
          $.ajax({
              url : 'Details',
              type : 'POST',
              data: "",
              success : function(msg) {
                  $("#NOFOLLOWING").html(msg);
  
              }
          });
  
      });
  </code></pre>
  
  <p>and my html element is </p>
  
  <pre><code>  &lt;u id ="noOfFollowing"&gt;&lt;/u&gt;&lt;i id="NOFOLLOWING""&gt;&lt;/i&gt;
  </code></pre>
  
  <p>i want to call the ajax function without clicking the html element. It should be called after every page reload. As soon as reload my web page this function should be called immediately without clicking separately. Here the url is a servlet. If some other alternative is there then please suggest them also. </p>