No. of Recommendations: 5
First, try to avoid using document.all if you can. It's not really "proper" javascript (in that it was initially IE only and may not be supported by all browsers).

But, now that I'm looking more closely at your initial code, here's the problem:

You had this:

getElementById is a function, so it needs to be this:

Try that and it should work in any browser since IE5 on.

Print the post  


What was Your Dumbest Investment?
Share it with us -- and learn from others' stories of flubs.
When Life Gives You Lemons
We all have had hardships and made poor decisions. The important thing is how we respond and grow. Read the story of a Fool who started from nothing, and looks to gain everything.
Community Home
Speak Your Mind, Start Your Blog, Rate Your Stocks

Community Team Fools - who are those TMF's?
Contact Us
Contact Customer Service and other Fool departments here.
Work for Fools?
Winner of the Washingtonian great places to work, and Glassdoor #1 Company to Work For 2015! Have access to all of TMF's online and email products for FREE, and be paid for your contributions to TMF! Click the link and start your Fool career.