By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,605 Members | 2,153 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,605 IT Pros & Developers. It's quick & easy.

Mouseover over gif in frame changes background color of same frame

P: 1
I am trying to design a page that is a frames page - horizontally split through the middle. The bottom frame contains the images that will link to completely new page. But before clicking on image to go to another page, I want it so that when the user puts their mouse over the black and white image, the image will swap to the same image in color AND the background of the frame will change to a specific color. I am using Front Page 2003 on XP. Does anyone know of a script I can use? I tried going into Behaviors, then tried a mouseover - go to URL with the URL going to a "page" which is the bottom frame, but it doesn't work.

Sep 9 '06 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 16,027
You can swap the image like this:
[html]<img id="image" src="whatever.gif" onmouseover="changeColBkg(this)">[/html]and in the javascript:
Expand|Select|Wrap|Line Numbers
  1. function changeColBkg(img) {
  2.     // change img src:
  3.     img.src='samecolor.gif';
  4.     // change frame background
  5. = "#000000" // change to hex color that you want
  6. }
May 14 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.