title: Java Script not working on my website
body: <p>The following script is not working when i upload it to my webpage. It works fine and loads the url if I try it on 'TryIt Editor' in w3school.com. I have changed the domain name in this example.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  
      &lt;script type='text/javascript'&gt;
          var x=1;
          function changeLink()
          {
             x=x+1;
             var y="http://example.com/basicone/image"+x+".html";
             document.getElementById('iframe-a').src=y;
          }
      &lt;/script&gt;
  
      &lt;iframe id="iframe-a" seamless src="http://example.com/basicone/image1.html" height="450" width="1000" scrolling="no"&gt;&lt;/iframe&gt;
      &lt;button id="button" onclick="changeLink()"&gt;Next&lt;/button&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>