title: How to load $.ajax (jquery) response to iframe every 20 seconds?
body: <p>How i can load this jquery get response to middle iframe in my page? The php script loads some data from mysql db? in this case i am not passing any data to php so do i need to make get or post request ? my code display the jquery response in alert but doesn't load it into iframe!</p>
  
  <pre><code>    setInterval(function() {
  
        $.ajax(
      {
          type: 'GET',
          url: './getDataFromMySQLdb.php',
          //data: $("#myform").serialize(),
  
           data: {
           title: 'test',
            // wrapper: 'testing'
           },
                  success: function (good)
                  {
                    //handle success
  
                        alert(good);
                      $("#middle").attr('src',+good); //change url
                  },
                  failure: function (bad)
                  {
                     //handle any errors
  
                    alert(bad)
  
                  }
  
  
      });
      }, 20000);
  
  &lt;iframe name="top" src="blank.php" id="top"  scrolling="no" noresize frameborder="0" marginwidth="0" marginheight="0" width="100%" height="79"&gt;&lt;/iframe&gt;
  &lt;iframe NAME="middle" src="blank.php" id="middle" noresize frameborder="0" marginwidth="0" marginheight="0" width="100%" height="238" scrolling="auto"&gt;&lt;/iframe&gt;
  &lt;iframe NAME="foot" src="blank.php" id="foot"  scrolling="no"  noresize frameborder="0" marginwidth="0" marginheight="0" width="100%" height="200"&gt;&lt;/iframe&gt;
  </code></pre>