Forum Moderators: phranque

Message Too Old, No Replies

Can I swap background image

with java

         

jamsy

11:27 am on Feb 26, 2003 (gmt 0)

10+ Year Member



Hi

I have a table with a background image set and need to swop this on a rollover command.

Can this be done?

Thanks

andreasfriedrich

11:42 am on Feb 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I do know that with NS4 you could access the scripting engine via a Java applet running in the browser. Iīm not sure though whether that is supported in other browsers since it would go against Javaīs sandbox model.

Of course you could simply use JavaScript to change the background or even just the CSS [w3.org] :hover pseudo class.

Andreas

jamsy

11:50 am on Feb 26, 2003 (gmt 0)

10+ Year Member



Of course you could simply use JavaScript to change the background

Thanks but how do i do it?

andreasfriedrich

12:03 pm on Feb 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



These threads might help. The first one contains an example of how to use JavaScript to change the background image while the second one shows how to do this using CSSīs :hover pseudo class.

change background image for a table cell [webmasterworld.com]

CSS Background Color Swapping on a Table - Is this possible with pure CSS? [webmasterworld.com]

Changing Classes Through Javascript - I want to change the class of an object through a javascript event (onClick) [webmasterworld.com]

HTH Andreas

jamsy

12:25 pm on Feb 26, 2003 (gmt 0)

10+ Year Member



thanks very much ;)