title: how to refresh the jsp page after ajax action
body: <p>My problem is I have one html table in jsp page .And i applied dragging and dropping technique for row ordering .I am also saving new order to DB(Mysql) By calling action through AJAX.and displaying the order By  using order by sql query .but for second time it is not working well because i am not able to get new rows order for TR id.Please sir share your view on that.I am doing dragging and dropping through Javascript code which is like that:</p>
  
  <pre><code>  this.onDrop = function(table, droppedRow ) {
      var rows = this.table.tBodies[0].rows;
      var debugStr = "";
      for (var i=0; i&lt;rows.length; i++) {
          debugStr += rows[i].id+" ";
          alert(debugStr);
          alert(droppedRow.id);
      }
      // document.getElementById('debug').innerHTML = debugStr;
      function ajaxRequest(){
          var activexmodes=["Msxml2.XMLHTTP", "Microsoft.XMLHTTP"] //activeX versions to check for in IE
          if (window.ActiveXObject){ //Test for support for ActiveXObject in IE first (as XMLHttpRequest in IE7 is broken)
              for (var i=0; i&lt;activexmodes.length; i++){
                  try{
                      return new ActiveXObject(activexmodes[i])
                  }
                  catch(e){
                  //suppress error
                  }
              }
          }
          else if (window.XMLHttpRequest) // if Mozilla, Safari etc
              return new XMLHttpRequest()
          else
              return false
      }
  
      //Sample call:
      var mypostrequest=new ajaxRequest()
      mypostrequest.onreadystatechange=function(){
          if (mypostrequest.readyState==4){
              if (mypostrequest.status==200 || window.location.href.indexOf("http")==-1){
                  document.getElementById("gfdg").innerHTML=mypostrequest.responseText
              }
              else{
                  alert("An error has occured making the request")
              }
          }
      }
      //var namevalue=encodeURIComponent(document.getElementById("name").value)
      // var agevalue=encodeURIComponent(document.getElementById("age").value)
      var parameters="array="+debugStr+"&amp;maxLimit="+droppedRow.id
      mypostrequest.open("POST", "tableAjaxUpdate.action", true)
      mypostrequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
      mypostrequest.send(parameters)
  }
  </code></pre>
  
  <p>and my Html table code is like that.</p>
  
  <pre><code>&lt;tr id="&lt;%= uniqueId%&gt;"&gt; / I am taking this row id from the db(from the exorder column)
      &lt;% System.out.println("AAAuniqueId-----&gt;" + uniqueId); %&gt;
      &lt;td height="30" align="center" valign="middle" class="vtd" width="3%"&gt;
      &lt;%=dayCount%&gt;
      &lt;/td&gt;
     &lt;td height="30" align="center" valign="middle" class="vtd" width="3%"&gt;
      &lt;%=exerciseGroupName%&gt;
       &lt;/td&gt;
  
      &lt;td height="30" align="center" valign="middle" class="vtd" width="3%"&gt;
      &lt;%=exerciseName%&gt;
      &lt;/td&gt;
      &lt;td height="30" align="center" valign="middle" class="vtd" width="3%"&gt;
       &lt;%=sets%&gt;
  
      &lt;/td&gt;
      &lt;td height="30" align="center" valign="middle" class="vtd" width="3%"&gt;
      &lt;%=reps%&gt;
      &lt;/td&gt;
     &lt;td height="30" align="center" valign="middle" class="vtd" width="3%"&gt;
     &lt;s:url id="idDeleteExName" action="deleteExNameInCustomtemplate"&gt;
          &lt;s:param name="dayCount"&gt; &lt;%=dayCount%&gt;&lt;/s:param&gt;
          &lt;s:param name="cusExId"&gt;&lt;%=cusExId%&gt;&lt;/s:param&gt;
          &lt;s:param name="routineId"&gt;&lt;%=routineId%&gt;&lt;/s:param&gt;
     &lt;/s:url&gt;
    &lt;s:a href="%{idDeleteExName}"&gt;&lt;img src="images/tables/delete-icon.png" style="width: 35px;height: 35px;"&gt;&lt;/s:a&gt;   
    &lt;/td&gt;
  </code></pre>
  
  <p></p>