473,724 Members | 2,240 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Image in frame on mouse hover

Hi all,

I am searching for a script which does the following:

I have a frameset with two pages: left and right.
On the left page there is an image map. When I hover the mouse over a
certain area of the image map, I want to appear an image in the right page.
There are more area's on the image map. I want a specific picture to appear,
each one correlated to a specific area. Is there any scrip which can do
this?

Thanks in advance for your help.

With best regards,

Fokke Nauta
Jan 26 '06 #1
4 8154
Fokke Nauta wrote on 26 jan 2006 in comp.lang.javas cript:
I am searching for a script which does the following:

I have a frameset with two pages: left and right.
On the left page there is an image map. When I hover the mouse over a
certain area of the image map, I want to appear an image in the right
page. There are more area's on the image map. I want a specific
picture to appear, each one correlated to a specific area. Is there
any scrip which can do this?


You could write a script, beste Fokke,
but if there "is" one [where?] I wouldn't know.

In Javascript you can reference other frames like this:

<script type='text/javascript'>
var Imag = parent.otherFra me.document.get ElementById('im ag')
var ImagOrigSrc = Imag.src
</script>

<...
onmouseover = "Imag.src = '/images/myImg.jpg'"
onmouseout = "Imag.src = ImagOrigSrc"

Not tested.

However, Fokke, why use frames?
Much better use <div>s, classes and and css styles.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 26 '06 #2
"Evertjan." <ex************ **@interxnl.net > wrote in message
news:Xn******** ************@19 4.109.133.242.. .

<cut>
You could write a script, beste Fokke,
but if there "is" one [where?] I wouldn't know.

In Javascript you can reference other frames like this:

<script type='text/javascript'>
var Imag = parent.otherFra me.document.get ElementById('im ag')
var ImagOrigSrc = Imag.src
</script>

<...
onmouseover = "Imag.src = '/images/myImg.jpg'"
onmouseout = "Imag.src = ImagOrigSrc"

Not tested.

However, Fokke, why use frames?
Much better use <div>s, classes and and css styles.


Hi Evert Jan,

Thanks for your quick reply.
I will give it a try, although I'm not a javascript programmer.
Initially I wanted to use a frame because I thought this in the only way to
show a picture when hovering over an image map. Obviously there must be
other ways. I have to look into <div>s and classes.
If you have a hint of how to achieve this without using a frame, you are
welcome.

Groeten,
Fokke
Jan 27 '06 #3
Fokke Nauta wrote on 27 jan 2006 in comp.lang.javas cript:
Thanks for your quick reply.
I will give it a try, although I'm not a javascript programmer.
Initially I wanted to use a frame because I thought this in the only
way to show a picture when hovering over an image map. Obviously there
must be other ways. I have to look into <div>s and classes.
If you have a hint of how to achieve this without using a frame, you
are welcome.


Frames have nothing to do with it.

<map name="myMap">
<area shape="rect" coords="20,30,6 50,111" nohref
onMouseOver="to ggleImage('imag 1.jpg')">
<area shape="rect" coords="....
<area shape="rect" coords="....
<area shape="..." coords="....
</map>

<img src="/images/mapImage.jpg" border="0" usemap="#myMap"
onMouseOut="tog gleImage('defau lt.jpg')"
style="position :absolute;right :20px;bottom:50 px;">
<imag src='default.jp g' id ='imloc'>
<script ....

function toggleImage(im) {
document.getEle mentById('imloc ').src=im
}

not tested, you will have to debug this.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 27 '06 #4
"Evertjan." <ex************ **@interxnl.net > wrote in message
news:Xn******** ************@19 4.109.133.242.. .
Fokke Nauta wrote on 27 jan 2006 in comp.lang.javas cript:
Thanks for your quick reply.
I will give it a try, although I'm not a javascript programmer.
Initially I wanted to use a frame because I thought this in the only
way to show a picture when hovering over an image map. Obviously there
must be other ways. I have to look into <div>s and classes.
If you have a hint of how to achieve this without using a frame, you
are welcome.


Frames have nothing to do with it.

<map name="myMap">
<area shape="rect" coords="20,30,6 50,111" nohref
onMouseOver="to ggleImage('imag 1.jpg')">
<area shape="rect" coords="....
<area shape="rect" coords="....
<area shape="..." coords="....
</map>

<img src="/images/mapImage.jpg" border="0" usemap="#myMap"
onMouseOut="tog gleImage('defau lt.jpg')"
style="position :absolute;right :20px;bottom:50 px;">
<imag src='default.jp g' id ='imloc'>
<script ....

function toggleImage(im) {
document.getEle mentById('imloc ').src=im
}

not tested, you will have to debug this.

--


Bedankt, Evertjan.

I'll give it a try!

Best regards,
Fokke
Jan 30 '06 #5

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

Similar topics

5
3049
by: Roger Shrubber | last post by:
I have a page with images that the user can drag from one frame to another. I need them to see a "ghost image" of the image they are dragging, while the original stays put. I use the onmousemove event to keep the ghost image under the mouse pointer. There are three problems: (1) if the ghost image is dragged so it is partially off the edge of the screen, scrollbars appear. This not only looks bad, it can cause the page to autoscroll...
33
27762
by: Thomas Mlynarczyk | last post by:
Hi, I'm looking for a way to put a 1px solid border around the image in this link: <a href="some.html"><img src="some.gif"></a> Well, that, by itself, is simple. However, I would like to have a different border color for a mouse hover effect over the image. With Mozilla, I can simply specify img:hover {...}, but IE allows hover only for <a>. So now I'm looking for a way to set the border for my <a> element rather than the <img>, but...
6
10063
by: killerkatt | last post by:
I am new to CSS and would like to know if there is a way to make this happen with CSS: image1 and image 2 are laid out at the top of the page. when the mouse hovers over image1, a paragragh or so of formatted text appears below, when the mouse leaves the image, the text disappears; when the mouse hovers over image2, a different body of text appears in
2
9488
by: Pamel | last post by:
I currently have a page that has 6 images in a row. Using javascript, when the mouse goes over one of the images, a word is placed below the images. Each image has a different word. I am trying to change this to happen through CSS. I think I might be able to use a hover technique similar to the one used here: http://css.maxdesign.com.au/listamatic2/horizontal04.htm Focusing specifically on this line:
8
12798
by: JLahm | last post by:
I have defined a class for my images called .image that specifies the default border color, width and style. I'd like to be able to have the pseudo elements link, visited and active have one color and style, while the hover class has a different color and style. I have the entries: a:link .image { border-color: #151515; border-style: solid; border-width: 2px; }
2
9170
by: Kevin Lyons | last post by:
Hello, Can anyone assist me with what I am trying to do with the following code (six different scenarios to try to make the functionality work correctly)? I want to always (and ONLY) display in the status bar 'Symantec Corporation' whenever anyone mouses over (onMouseOver) my image or link OR when one clicks while holding the left mouse down (onClick) on the same image or link. Upon releasing the mouse (onMouseOut), the
7
27500
by: fredo | last post by:
I've studied Eric Meyer's pure css popups, version two: http://meyerweb.com/eric/css/edge/popups/demo2.html which pops up an image when I roll over a text link. Now I want to pop up a large image when I roll over a thumbnail. I've tried some things, but can't make it work. See here (Warning: adult matter):
7
17276
by: Cate Archer | last post by:
I want to have a border around an image that changes color when the mouse hovers over it. The following code works perfectly in FireFox but not in Internet Exploiter. The text link changes color but the image link stays the same. Anybody know how I can make it work in IE? I saw a web site where the guy got it to work in both browsers. <html> <head> <title>TEST</title>
5
4654
by: studentofknowledge | last post by:
hi guys im new to javascript and need some guidence please.. im trying to display a 400x400 pixel coloured area in the middle of a webpage that stays in the middle with a browser window resize. Within the area, i would like to display an image and some text, overriding a few words with an inline style. i would like the image to change once the mouse is placed over it. and when the mouse is removed from the image the image should...
0
8868
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8741
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9388
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9241
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9160
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8062
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6685
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4504
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4764
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.