title: How can I run ajax code without web server?
body: <p>I am running ajax without a server on my system, I have created one index.html with this.</p>
  <p><strong>JavaScript function:</strong></p>
  <pre><code>function do_the_click(url)
  {
  alert('inside this method do_the_click');
      $.ajax({
                           async: false,
                           url : url, 
                           contentType: &quot;text/html&quot;,
                           type : &quot;GET&quot;,
                           dataType : &quot;text/html&quot;,                
                           success: function(data){
                           alert('data');
             }});
  } 
  </code></pre>
  <p>My HTML body content is:</p>
  <pre><code>&lt;a href=&quot;Java Collections.html&quot; class=&quot;button&quot; id=&quot;javacollections&quot; onclick=&quot;do_the_click('this.href');&quot;/&gt;Java Collections&lt;/a&gt;
  </code></pre>
  <p>I'm able to get the this message in alert window <em>inside this method <code>do_the_click</code></em> but am not able to get the data in alert window, and so not able to get the page Java Collections.html in the index.html,</p>
  <p>I have searched very much on Google re. how to load the data locally without using server in <code>jquery.ajax</code> but I didn't find any good solution, so I think that its good for others as well if it resides on Stack overflow.</p>