Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


FireFox - Onclick Set Table Cell Background Image..

Posted on 2006-11-02
Medium Priority
Last Modified: 2008-02-01
Below Javascript function works (toggle background image) great in IE but NOT in FireFox.

 function CircleTD(id){
       if (document.getElementById('Hid2').value!="185")
...Table cell
<TD id="tdC" onclick="CircleTD(tdC)" align="center" width="3.8%">C</TD>

Apparently, found that 'background' property is an MS extension for HTML Object. I tried to apply style sheet background property, it seem to work with in-line style property but not when onclick with javascript. I would like to make this work on both IE and FireFox, any workable alternatives would be greatly appreciated. Thank you!
Question by:rcsunkara
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 17866189

Author Comment

ID: 17868643
Hi Yeroket,

Thank you for the response. I tried that it didn't work but the below CSS style sheet classes to set background image seem to work on both IE and FireFox.

  background-image:  url(Circle.bmp);
  background-image: url(EmptyCircle.bmp);

function mouseIn(cell)      {     
       else {
I am closing this issue.
LVL 15

Accepted Solution

JakobA earned 2000 total points
ID: 17871355
The standard name for the background image attribute is background-image (in CSS) or backgroundImage (using JavaScript)
>content of the span</span>

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After uninstalling Opera browser (for example ver. 10.63), your attempts to open a web page by clicking on a URL link may fail with an error message.  The error is "This operation has been canceled due to restrictions in effect on this computer. Ple…
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question