Arthalius
asked on
What am I missing?
OK, I'm trying to do something here that should be fairly simple. I have an A located in my code that needs to have a different HREF value based upon the browser and some other data the user enters. The problem is that I cant get this to work. Here is an example of a greatly simplified version of the code that is producing the problem :
In FF, the code simply doesn't work. In IE8, the code fails with the error message, "Object doesn't support this property or method". I've looked up the docs and it looks to me like this SHOULD be working. Any ideas?
<a id="fms" class="player" style="display:block;width:624px;height:352px" href="#">
<img src="/flowplayer/intro.png" alt="Click here to start playback" width="624px" height="352px" border="0" />
</a>
<script type="text/javascript" >
document.getElementByID("fms").href = "http://www.google.com";
</script>
In FF, the code simply doesn't work. In IE8, the code fails with the error message, "Object doesn't support this property or method". I've looked up the docs and it looks to me like this SHOULD be working. Any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Doh! How'd I miss that?
Open in new window