473,396 Members | 2,098 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

MouseOver in frames

In a frameset, the menu frame has six buttons. I would like to use
mouseOver on these buttons to make images change in another frame.
Does anyone have a script or know of a working site where this is used?

Any help is appreciated.

Thanks,

Com

Jul 23 '05 #1
1 1836
Com Dot wrote:
In a frameset, the menu frame has six buttons. I would like to use
mouseOver on these buttons to make images change in another frame.
Does anyone have a script or know of a working site where this is used?

Any help is appreciated.

Thanks,

Com

There is a plethora of syntactical ways to do this, but logically
they're all pretty much the same:

Use the document.frames collection to identify the frame you'd like to
address, then work with it as you would any other window.

You might want to Google it or find JavaScript and DOM documentation
that pleases you. There are also many excellent tutorials out there
that you may find valuable.

Some generic examples follow:

document.frames[ myFrame ].document.images[ myImage ].src =
'images/aPicture.pic';

------

with( document.frames[ myFrame ] ) {
document.images[ myImage ].src = 'images/aPicture.pic';
// other things you want to do in the frame
}

------

pictureFrame = document.frames[ myFrame ];
pictureFrame.document.images[ myImage ].src = '...';

------

picture = document.frames[ myFrame ].document.images[ myImage ];
picture.src = '...';

------

You may also (in some cases) refer to the frame directly, though this
is bad practice:
<frame name=PictureFrame id=PictureFrame ... />

PictureFrame.document.images[ myImage ].src = '...';

------

Alternative to the document.frames and document.images collections, you
may use the document.getElementById method. Don't, though.

Again, there's a wealth of excellent tutorials out there.

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: OysterCracker | last post by:
Hi - I've previously used js to swap images on mouseover in a menu. I'm stumped on a different situation and would appreciate some advice. I would like to swap imageA to ImageB when I mouseover...
2
by: John J | last post by:
Hi there I have the following code on a site that works as it should but I'd like to understand how it works (a luxury I realise :). I use it to change the colour of buttons on a menu when a...
14
by: J. Makela | last post by:
Hallo. This should be a pretty entertaining question for you *real* javascript writers.. I, being the lowly photoshop guy at an ad agency made the mistake of actually saying "HTML" in a...
2
by: Alex | last post by:
On my page I have a lot string like this: <span onmouseover="callMe(this)" onmouseout="callMe(null)" >abc1</span> <span onmouseover="callMe(this)" onmouseout="callMe(null)" >abc2</span> <span...
1
by: seaberry | last post by:
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...
3
by: Annette Acquaire | last post by:
I have and image map with a dozen hotspot links on it that I'm trying to get to open a new image over existing one on mouseover of each COORD. The only thing I was able to do was swap image on...
23
by: Schannah | last post by:
I'm trying to create a design which mimics the Radiohead website in the action on this page, but the problem is that they use PHP for the effect and I have no idea about PHP. I'm very amateur: fairly...
1
by: dave345 | last post by:
This javascript issue is in an app using C# / .Net 2.0 running on XP. First post, please mention if I mess up any conventions of this forum. I’ve got a mouseover event that only works properly...
2
by: markszlazak | last post by:
I'm a relatively slow response of table cells changing their background color with mouseover/our in IE6 (Win 2K) but the response is fine (fast) in Firefox. Why? The code is below. Sorry about the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.