troubleshooting Question

What am I missing?

Avatar of Arthalius
Arthalius asked on
3 Comments1 Solution179 ViewsLast Modified:
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 :

<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" />

<script type="text/javascript" >
     document.getElementByID("fms").href = "";

Open in new window

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?
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros