Forum Moderators: open

Message Too Old, No Replies

Background images in cells w/ mouseover

Mouseover features that change other images

         

Deric

7:07 am on Jan 9, 2002 (gmt 0)



I am trying to change a table background image while I mouse over other images in that same cell. Can this be done? I have seen several scripts that when you mouseover one image it changes another on the same page but I haven't found one that will let the background image change. I am very new to this and after hours of trying to figure this out I am stumped

tedster

6:27 pm on Jan 9, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member


Welcome to Webmaster World, Deric.

Here's a page that offers some relevant code. I haven't tried it, but it looks like you might be able to adapt it for your purposes.

http://www.codebelly.com/javascript/backimagechange.html

Deric

2:56 am on Jan 10, 2002 (gmt 0)



Thanx,
that script changes the whole background of the page (document.body.background) how would I adapt it to change a table or cell background & not the whole page?

tedster

8:14 am on Jan 10, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member


Sorry, Deric, I didn't read your question closely enough first time around.

I can't find any cut-and-paste code for your exact situation, but here's some javascript that lets you [url=http://www.faqts.com/knowledge_base/view.phtml/aid/4005/fid/192]access the background image of a table cell[/url]. Scripting the specific behavior you're asking for could start from there.

This may get complicated -- there are separate techniques for separate browsers. Can you give it a try? I'll also give it shot when I can clear some time for experimenting.

Deric

3:36 am on Jan 11, 2002 (gmt 0)



Thanx again! I just gave the table an Id & set the link for a mouseover & it all worked great! :)