Firefox and iFrame Onclick event

Hello-

I have the following onClick event that works great in IE but fails to work in firefox?
Any Ideas?
<a onClick="window.parent.weboptions.photo.value='98432943.jpg';return false" href="#">Click Me</a>

Open in new window

jfergyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Thomas Zucker-ScharffSolution GuideCommented:
IE is more forgiving than any other browser.  I haven't coded in a while but try putting this:

<a href="#" onClick="window.parent.weboptions.photo.value='98432943.jpg';return false">Click Me</a>
jfergyAuthor Commented:
No go on that. If I called it by ID rather than name for Firefox does that help?
StealthyDevCommented:
Hi, may i know the which component is "weboptions" and "photo"?
jfergyAuthor Commented:
weboptions is the form name and photo is the text field. I do have readonly on the text field so that it can only be updated by clicking on a value in the iframe
Adoryc666Commented:
If you add document after window.parent it will work in all browsers.
<a onClick="window.parent.document.weboptions.photo.value='98432943.jpg';return false" href="#">Click Me</a>

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Browsers

From novice to tech pro — start learning today.