HighDots Forums  

Re: How does one change the background image of a <TD> using JavaScript?

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: How does one change the background image of a <TD> using JavaScript? in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Martin Honnen
 
Posts: n/a

Default Re: How does one change the background image of a <TD> using JavaScript? - 08-02-2003 , 04:28 AM








MyndPhlyp wrote:
Quote:
There is a property for bgColor, but not one for backgroundImage. What I
want to do is change the table cell's background image when "onmouseover"
fires.
Script the CSS inline style of the element
<td onmouseover="if (this.style)
this.style.backgroundImage = 'url(whatever.gif)';">



--

Martin Honnen
http://JavaScript.FAQTs.com/



Reply With Quote
  #2  
Old   
MyndPhlyp
 
Posts: n/a

Default Re: How does one change the background image of a <TD> using JavaScript? - 08-02-2003 , 08:38 AM







"Martin Honnen" <Martin.Honnen (AT) t-online (DOT) de> wrote

Quote:

MyndPhlyp wrote:
There is a property for bgColor, but not one for backgroundImage. What I
want to do is change the table cell's background image when
"onmouseover"
fires.

Script the CSS inline style of the element
td onmouseover="if (this.style)
this.style.backgroundImage = 'url(whatever.gif)';"
<sigh>And here I was playing around with ids and everything else trying to
handle something as simple as that.</sigh>

<thanx/>




Reply With Quote
  #3  
Old   
MyndPhlyp
 
Posts: n/a

Default Re: How does one change the background image of a <TD> using JavaScript? - 08-02-2003 , 09:16 AM




"Martin Honnen" <Martin.Honnen (AT) t-online (DOT) de> wrote

Quote:

MyndPhlyp wrote:
There is a property for bgColor, but not one for backgroundImage. What I
want to do is change the table cell's background image when
"onmouseover"
fires.

Script the CSS inline style of the element
td onmouseover="if (this.style)
this.style.backgroundImage = 'url(whatever.gif)';"
<arghh>And it works just fine ... except with NS4, of course.</arghh>
<damn/>




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.