title: JavaScript/jQuery reference to a third party website works locally, not when hosted on godaddy run site (404 error)
body: <p>I am beginning work on a web app that involves text-to-speech. Using a technique learned from youtube user Wes Bos, my code passes a random number through Google's english text-to-speech API (literally pasting it into the URL and returning the audio) each time a button is clicked. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
     &lt;head&gt;
         &lt;meta charset="UTF-8"&gt;
         &lt;title&gt;SujiQ Dev.0&lt;/title&gt;
         
   
     &lt;/head&gt;
     
  &lt;body&gt;
  
     &lt;!--text display/button --&gt;
  
          &lt;p&gt;generate random number&lt;/p&gt;
    &lt;div id="output1"&gt;&lt;/div&gt;
    &lt;button id="btn1" onclick="outText()"&gt;Random number&lt;/button&gt;
   
   &lt;!--Hidden audio player --&gt;
  
          &lt;audio src="" class="speech" hidden&gt;&lt;/audio&gt;
  
  &lt;!--jQuery lib--&gt;
         &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"&gt;&lt;/script&gt;
   
  &lt;!--read number out loud each button click --&gt;
  
         &lt;script&gt; 
  
  /*displays random number-of-the-moment; called on button click */
  
    function outText() {
    
  
    var randNum = Math.round(Math.exp(Math.random()*Math.log(10000000-0+1))); /*that's more like it*/
  
    document.getElementById("output1").innerHTML = randNum;
  
  /* play audio of random number */
  
    $(function(){
          $("button#btn1").on("click",function(e){
            e.preventDefault();
            
            
            var url = "https://translate.google.com/translate_tts?ie=UTF-8&amp;q=" + randNum + "&amp;tl=en";
  
            $(".speech").attr("src", url).get(0).play();
   
   
          });
         });
  
    }
       
   
         &lt;/script&gt;
  
   &lt;/body&gt;
   
  &lt;/html&gt;
   </code></pre>
  </div>
  </div>
  </p>
  
  <p>This code executes swimmingly without fail when run locally on my browser, but when hosting the exact same code on my godaddy provided site, the random number generator works but access to google's speech API almost always fails, returning a network console error along the lines of: "GET <a href="https://translate.google.com/translate_tts?ie=UTF-8&amp;q=152&amp;tl=en" rel="nofollow">https://translate.google.com/translate_tts?ie=UTF-8&amp;q=152&amp;tl=en</a> 404 (Not Found)". Interestingly, once in a very blue moon, it goes through and reads the number out loud.</p>
  
  <p>What gives? I've looked around but I'm stumped. </p>
  
  <p>[[Edit]]
  The code also fails to read the number out loud when run as a Stack Overflow snippet</p>