Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Change foreground/layer color on AREA mouseover??

Reply
Thread Tools

Change foreground/layer color on AREA mouseover??

 
 
spamforsteve@hotmail.com
Guest
Posts: n/a
 
      01-06-2006
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

 
Reply With Quote
 
 
 
 
Jonas Raoni
Guest
Posts: n/a
 
      01-06-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) 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

 
Reply With Quote
 
 
 
 
Danny
Guest
Posts: n/a
 
      01-08-2006


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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing font color from current font color to black color Kamaljeet Saini Ruby 0 02-13-2009 04:58 PM
How to highlight (change background color) of selected text within a text area omidalavi@yahoo.com Javascript 0 09-23-2005 04:34 PM
how to change the color an area on an imagemap when clicking? Yaqian Javascript 0 04-16-2005 04:29 AM
Change text color for one document.write but not color of all text? kroger@princeton.edu Javascript 7 02-02-2005 01:23 PM
Change text color of "visited link" back to unvisited color ??? Matt Adams HTML 0 08-26-2003 10:27 AM



Advertisments