473,396 Members | 1,804 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.

Change foreground/layer color on AREA mouseover??

Hi, all! I have an imagemap of a floor of offices. I have various
events and an onclick function working just fine, but I'd like to be
able to change the color of the region being hovered over. Is there
any way to do this? Presumably I could just read the coords of the
region, create a floating layer dynamically, and change the color, no?
Unfortunately, I can't manage to read the coords property, and I'm not
entirely certain how to build the floating layer.

Any suggestions? No, I don't want to use Flash for this... ;-)

Thanks!
Jack

Jan 6 '06 #1
2 3100
sp**********@hotmail.com escreveu:
Hi, all! I have an imagemap of a floor of offices. I have various
events and an onclick function working just fine, but I'd like to be
able to change the color of the region being hovered over.


You should post a link to help people understanding what you've done =)

Are you using those mapped anchors? If yes, I think you'll have to keep
the origin point coords somewhere or parse the coords and shape
properties... If this is build dinamically, you can parse once and
store in your database... Then you'll just need to place an image with
the hovering effect over the real image... But this image will "hide"
the link haha, so you'll have to emulate the link onclick :)

Sorry for not helping too much ;]
--
Jonas Raoni Soares Silva
http://www.jsfromhell.com

Jan 6 '06 #2


Try
<div id="overlayer" style="position: absolute;display: none"> give
this div some width/height and a tone of gray or whatever color you
need as overlay</div>
<area .... onmouseover="YOURFUNCTION(this,'block')"
onmouseout="YOURFUNCTION(this,'none')">
function YOURFUNCTION(el,sView) {
myoverlayer=document.getElemetnById('overlayer');
myoverlayer.style.left=el.offsetLeft;
myoverlayer.style.top=el.offsetTop;
myoverlayer.style.display=sView;
}

Danny
Jan 8 '06 #3

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

Similar topics

1
by: Jean-Gael GRICOURT | last post by:
I am trying to capture mouse events when entering and leaving a DIV layer. This test code works fine with IE 6.0 and Opera 7.21 but fails with Mozilla/Netscape. The strange thing is that the mouse...
0
by: Victor Bastiaansen | last post by:
For use in a menu I build a stylesheet which crops an image which contains both the normal button-state and the mouseover-state. On a mouseover the layer background-images 'moves', and another part...
2
by: RWD | last post by:
I am trying to figure out how to change the target frame in my hyperlink on a DHTML menu. The menu is in one frame and the target frame is called "main" The code is below: Thanks in advance...
2
by: Kris Krieger | last post by:
Hello, Group, I hope it's OK for me to ask this question here, since I'm a "dabbler", not a "programmer". What I'd like to do, if it's possible, is find a reference or example/template that...
4
by: GD | last post by:
I have a collection of asp:LinkButtons on a web form. Based on some reporting criteria, I will be "highlighting" some of these LinkButtons. I'd like the user to be able to mouseover the...
4
by: Stephen | last post by:
greeting folks I would like to change the foreground color for a disabled textbox from the dimmed gray to something else that is easlier readable. I can change the background using the...
5
by: Sabbaath | last post by:
First off, I've pretty much convinced myself that the issue is that there are onmouseover events inside the div that contains an onmouseover event on it... I wrote the message below first. This was...
6
by: David Stone | last post by:
I have a simple question about the alt content of area elements within an image map: is it redundant to include phrases such as "link to..." or "jump to..."? My initial thought is 'yes', since...
5
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....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
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,...

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.