views:

64

answers:

1

hi

I am very new to javascript so bear with me:

I am trying to replace one quicktime movie with another one, so far i have used this code from apple and it works great

you can see my efforts here: http://www.centurysunstudios.co.uk/test/ please look at the source code (i tried to past the code here but would not let me for some reason; said i could only post one url as a new user? )

the problem is that the replace method apple use works in every browser (on osx and windows) apart from IE. In IE the movies do not replace and i get this message;

Error: document.movie is null or not an object

Apple seem to not have a solution and my javascript is limited

Any help would be greatly appriciated

Thanks

A: 

Try this:

<script>
function changeMovie(movieURL){
  var embeds = document.getElementsByTagName("embed");
  for(var i=0;i<embeds.length;i++){
    if(embeds[i].getAttribute("name")=="movie"){
      embeds[i].SetURL(movieURL);
    }
  }
}
</script>

<a href="javascript:changeMovie('o2.mov');">L(o2)</a>
Victor
thanks for your help victor but it seems to not work in IE ?
EKG