Preserved Topic: Addressing Table Cell Background Image |
|
---|---|
Author | Thread |
Paranoid (IV) Mad Scientist From: Inside THE BOX |
posted 09-24-2001 20:45
So, I'm using a very simple function to change the background image of a particular table cell for one particular page on my site. The table cell uses the ID "contentCell" and I use an onLoad event in the BODY to run a simple function (below). Naturally, it's easy to target the cell's background in IE, but I can't figure out how to target it in NN. |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 09-24-2001 21:28
In NN4 you can't change TD element's background dynamically (only layers can change background image in NN4). Changing background image on TD element will work in Opera, IE and Mozilla... Use the following code: |
Paranoid (IV) Mad Scientist From: Inside THE BOX |
posted 09-25-2001 07:13
Cool, thanks, Max. I have a couple questions, though. |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
posted 09-25-2001 07:46
document.all is an IE construct |
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 09-25-2001 14:36
IE came up with doc.all before the getElementById standard was created. So IE 4 supports only doc.all, IE 5 and 6 supports doc.all *and* getElementById. Standard compliant browsers (mozilla for instance) support only getElementById. |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 09-25-2001 19:53
Wes, yes, it should be document.all[layer] (I made small typing error). Also, you should use complete function (exactly as I wrote it), if you want to make your page work in Opera, IE and Mozilla... |
Paranoid (IV) Mad Scientist From: Inside THE BOX |
posted 09-25-2001 22:27 |