title: Refresh div contents after making changes
body: <p>Below is my code which is working fine...</p>
  
  <pre><code>&lt;Script type="text/javascript"&gt;
  function im()
  {
      var Name=document.getElementById("Name").value;
      var pointsize=document.getElementById("pointsize").value;
      var format=document.getElementById("format").value;
      var bckclr=document.getElementById("bckclr").value;
      var color=document.getElementById("color").value;
      var bcolor=document.getElementById("bcolor").value;
      var font=document.getElementById("font").value;
  
      $(document).ready(function(){
          var url = 'Name='+Name+'&amp;pointsize='+pointsize+
                    '&amp;format='+format+'&amp;bckclr='+bckclr+
                    '&amp;color='+color+'&amp;bcolor='+bcolor+
                    '&amp;font='+font;
  
          alert(url);
          //-----Sending request to server for getting job name list by ajax-----
          $.ajax({
              type    : "POST",
              url : "i.php?",
              data    : url,              
              cache   : false,
              success : function(html) {
                  //document.getElementById('Div_PJobId').style.display="block";
                  //alert('hi');
                  alert(html);
                  var pic='&lt;img src="'+html+'"&gt;';
                  $("#Div_Im").html(pic).show();
              }
          });
      });
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>and php code...</p>
  
  <pre><code>echo('Name: &lt;input type="text" id="Name" onchange="im()" value="your name"  name="Name" /&gt;');
  
  echo('pointsize: &lt;input type="text" id="pointsize" onchange="im()" value="50" name="pointsize" /&gt;');
  
  echo('format: &lt;input type="text" id="format" value=".gif" onchange="im()" name="format" /&gt;');
  
  echo('BackGround Color: &lt;input type="text" id="bckclr" value="red" onchange="im()" name="bckclr" /&gt;');
  
  echo('FontColor: &lt;input type="text" id="color" value="white" onchange="im()" name="color" /&gt;');
  
  echo('Border Color: &lt;input type="text" id="bcolor" value="blue" onchange="im()" name="bcolor" /&gt;');
  
  echo('&lt;a href="./lang/ims.php"&gt;&lt;img src="'.$image.'" height="82" width="82" /&gt;&lt;/a&gt;');
  
  echo('Font: &lt;input type="text" id="font" value="'.$image1.'" onchange="im()" name="font" /&gt;');
  
  echo ('&lt;div id="Div_Im"&gt;');
  echo('replace me');
  echo ('&lt;/div&gt;');
  </code></pre>
  
  <p>As you can see, I am using AJAX to fetch data from server and displayed within  its working fine but I need to refresh div everytime I make changes .</p>
  
  <p>How to refresh div when I make some changes... also I need to add a symbol or loading image, when the data is being from server.....How to do that?</p>