title: Jquery with AJAX, not calling the action and not displaying the output. But, able to do with old way without ajax
body: <p>I am using Ajax async to pull one report from db.. I am able to do when i used this code</p>
  
  <pre><code>function showCustomer(str)
  {
      alert("Report is loading..!Please wait");
  
  var xmlhttp;    
  if (str=="")
    {
    document.getElementById("txtHint").innerHTML="";
    return;
    }
  if (window.XMLHttpRequest)
    {  xmlhttp=new XMLHttpRequest();
    }
  else
    {
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  xmlhttp.onreadystatechange=function()
    {
    if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200)
      {
      document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
      }
    }
  xmlhttp.open("GET","Pull.action?rel="+str,true);
  xmlhttp.send();
  } 
  </code></pre>
  
  <p>But when i try to use jquery ajax, i am not able to get the output,</p>
  
  <pre><code>$(document).ready(function() {
      $("#submit").click(function(event){
          $("#submit").hide();
          $('#txtHint').text("Loading..! Please Wait. !!");
          var name = $("#first").name();
  
          alert(name);
  
          $.ajax({
              type: "GET",
              url:"Pull.action?rel="+name,
               context: document.body,
              success: function(data){
                  alert(name);
  $('#txtHint').html(data);
                  //$('#txtHint').load("Pull.action?rel="+name);
                  $("#submit").show();
              }           
          });
      });
   });
  </code></pre>
  
  <p>Am i doing any mistake here, it is not calling that "pull.action" Struts2 action also. </p>
  
  <p>JSP which is using is </p>
  
  <pre><code>&lt;form action=""&gt; 
  &lt;table&gt;&lt;tr&gt;&lt;td&gt;
  &lt;s:select id="first" label="Please select the Go Live Date : "  name="applicationPhases" value="%{applicationPhases}" headerValue="--Select--"
    list="{'--Select--','Q1','Q2','Q3','Q4','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'}" /&gt;
  &lt;/td&gt;&lt;td&gt;
  &lt;s:submit id="submit" name="submit" value="Submit"  /&gt;  
  &lt;/td&gt;&lt;/tr&gt; &lt;/table&gt;
  &lt;/form&gt;
  &lt;br /&gt;&lt;br /&gt;
  &lt;br /&gt;
  &lt;div id="txtHint" /&gt;
  </code></pre>
  
  <p>Please help me out to make ajax request using jquery to call one action class from a jsp and display the output in same jsp.. (output will be display-tag table and variable has to be passed through url to action class) </p>