Solved

Can I make some buttons that do a little something???

Posted on 2003-11-11
3
152 Views
Last Modified: 2013-12-24
I have a FP framed page.
In the upper (top) frame, there is an image containing a logo, some words and some buttons. The buttons are just part of the bit-map and I can make them fire off a web page by mapping the bit-map, but I wondered if there was a way to give them a little more pizzaz.
I'd like them to have rollover and on-click events somehow.
I can't put buttons on top of the image (not allowed).
Any thoughts?
0
Comment
Question by:rbender
  • 2
3 Comments
 
LVL 31

Accepted Solution

by:
seanpowell earned 30 total points
ID: 9732361
You can use div's for this to show and hide images on top of your image map, and use the onclick event for the function. Here's an example:

<html>
<head>
<title>ImageMap Rollover</title>
<script language="JavaScript">
<!--
function show(layerid) {
  if (document.all){
    layerid.style.visibility="visible"
    }
  else
  if(document.layers){
    layerid.visibility="show"
    }
  }
function hide(layerid){
  if (document.all){
    layerid.style.visibility="hidden"
    }
  else
  if(document.layers){
    layerid.visibility="hide"
    }
  }
//-->
</script>
</head>
<body>
<img src="images/myimage.gif" border="0" usemap="#imagemap1" width="200" height="100">
<map name="imagemap1">
<area shape="rect" coords="0,0,100,100" href="page1.html" onMouseover="show(image1);" onMouseout="hide(image1);" onClick="somefunction();">
<area shape="rect" coords="100,0,200,100" href="page2.html" onMouseover="show(image2);" onMouseout="hide(image2);" onClick="somefunction();">
</map>

<div id="image1" style="position:absolute;l eft:0;top:0; visibility:hidden; width:100px; height:100px;">
<img src="images/myimage2.gif" border="0" width="100" height="100">
</div>

<div id="image2" style="position:absolute; left:100;top:100; visibility:hidden; width:100px; height:100px;">
<img src="images/myimage3.gif" border="0" width="100" height="100">
</div>
</body>
</html>
0
 

Author Comment

by:rbender
ID: 9732953
Good Stuff...thanks
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9733117
You're welcome, and thanks.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now