title: javascript - changing embedded objects src problem for Firefox (no problem for IE9 or Opera)
body: <p>this will be my first question. Sorry for mistakes.</p>
  
  <p>Following  code works in IE9 and Opera but does not work in Firefox.</p>
  
  <p>In Firefox, I am clicking another link and going back to the page that contains the video
  then video is starting. Otherwise, video is not starting. (again not starting when refreshing the page)</p>
  
  <pre><code>function output_video_URL(id, local_path_of_video, remote_path_of_video) {
      var http_check = getHTTPObject();
  
      var local_URL = local_server + local_path_of_video;
      var remote_URL = remote_server + remote_path_of_video;
  
      http_check.open("HEAD", local_path_of_video);
      http_check.onreadystatechange = handleHttpResponse_check;
      http_check.send(null);
  
  
      function handleHttpResponse_check() {
          if (http_check.readyState == 4){
              if (http_check.status == 200) {
                  var video = document.getElementById(id);
                  video.src = local_URL;
                  video.parentNode.Filename = local_URL;
              }
              else if (http_check.status == 404) {
                  var video = document.getElementById(id);
                  video.src = remote_URL;
                  video.parentNode.Filename = remote_URL;
              }
          }
      }
  }
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;object width="364" height="266" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" id="mediaplayer1"&gt;
    &lt;param name="Filename" value="filmler/canakkeleklipkucuk.wmv" /&gt;
    &lt;param name="AutoStart" value="True" /&gt;
    &lt;param name="ShowControls" value="false" /&gt;
    &lt;param name="ShowStatusBar" value="false" /&gt;
    &lt;param name="ShowDisplay" value="false" /&gt;
    &lt;param name="AutoRewind" value="false" /&gt;
    &lt;embed id = "canakkeleklip" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/" width="320" height="240" src="filmler/canakkeleklipkucuk.wmv" autostart="True"  showcontrols="false" showstatusbar="false"  showdisplay="false" autorewind="false"&gt; &lt;/embed&gt;
  &lt;/object&gt;
  &lt;script type = "text/javascript"&gt; output_video_URL('canakkeleklip', 'videos/canakkeleklipkucuk.wmv', 'filmler/canakkeleklipkucuk.wmv') &lt;/script&gt;
  </code></pre>