title: Auto refresh the src attribute of an IMG
body: <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;link rel='stylesheet' type='text/css' href='css/style.css'&gt;
          &lt;base href='http://150.20.1.30'&gt;&lt;base target='_self'&gt;
              &lt;title&gt;PLC&lt;/title&gt;
          &lt;script&gt;
              function change(pic){
              element_buts=document.getElementById("pic");
                  element_buts.src=pic;       
              }
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div class='content'&gt;
              &lt;div class='left'&gt;
                  &lt;img src='1.jpg' height='80%' id='pic'&gt;
              &lt;/div&gt;
              &lt;div class='right'&gt;
                  &lt;input type='button' class='buttons' value='PLC' onclick='change("1.jpg")'&gt;&lt;/br&gt;
                  &lt;input type='button' class='buttons' value='Furnace Draft' onclick='change("9.jpg")'&gt;&lt;/br&gt;
                  &lt;input type='button' class='buttons' value='Drum Level Graph' onclick='change("3.jpg")'&gt;&lt;/br&gt;
                  &lt;input type='button' class='buttons' value='Boiler Blowdown Time Setup' onclick='change("10.jpg")'&gt;&lt;/br&gt;
                  &lt;input type='button' class='buttons' value='Steam Press and Flow Graph' onclick='change("4.jpg")'&gt;&lt;/br&gt;
                  &lt;input type='button' class='buttons' value='Boiler Drum and Dearator Level' onclick='change("5.jpg")'&gt;&lt;/br&gt;
                  &lt;input type='button' class='buttons' value='Stack and Dearator Temperature' onclick='change("7.jpg")'&gt;&lt;/br&gt;
                  &lt;input type='button' class='buttons' value='Steam Flow and Pressure Graphs' onclick='change("8.jpg")'&gt;&lt;/br&gt;
                  &lt;div class='footer_right'&gt;  
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>above is my html and javascript code my reference of that function is <a href="http://www.w3schools.com/js/tryit.asp?filename=tryjs_lightbulb" rel="nofollow">http://www.w3schools.com/js/tryit.asp?filename=tryjs_lightbulb</a> what on this code is when you click the button the image inside <code>&lt;div class='right'&gt;</code> will be change prior to the value of function <code>change()</code>, my problem is what code or function that i need to put inorder the image will refresh or auto refresh, sample i lastly click the PLC button, i need a continuous refresh in order the 1.jpg pic shows an updated image. thx sorry im a newbie in java script thx </p>