Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website Design Forum


You are currently viewing our Website Design Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
make a layer visible on rollover?
Old 11-28-2004, 05:56 PM make a layer visible on rollover?
oohmygod831's Avatar
Average Talker

Posts: 29
Trades: 0
is it possible to make a layer visible when the cursor rolls over an image - (i am trying to create a multiple dropdown menu that uses my images) i have tried using the 'show pop up menu' in the behaviors but that only allows two menus per page and i need more, i also need to have layered menus eg

....A
....B
....C..-..c1
...........c2
...........c3..-..c3a
...................c3b
...................c3c


i thought about using layers but i need to be able to make them visible on rollover of an image. i would really appreciate some help with this
I am new to web design and am using Macromedia Dreamweaver MX 2004
:confused

Last edited by oohmygod831; 11-28-2004 at 06:05 PM..
oohmygod831 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-29-2004, 01:54 PM
Junior Talker

Posts: 4
Trades: 0
I found a script for hiding a print button when clicked, and I've amended the coding slightly to show a layer on mousing over an image instead. Hope it helps.

In the head, enter the following:

<script language="JavaScript" type="text/JavaScript">
<!-- Begin
// quick browser tests
var ns4 = (document.layers) ? true : false;
var ie4 = (document.all && !document.getElementById) ? true : false;
var ie5 = (document.all && document.getElementById) ? true : false;
var ns6 = (!document.all && document.getElementById) ? true : false;

function show(sw,obj) {
// show/hide the divisions
if (sw && (ie4 || ie5) ) document.all[obj].style.visibility = 'hidden';
if (!sw && (ie4 || ie5) ) document.all[obj].style.visibility = 'visible';
if (sw && ns4) document.layers[obj].visibility = 'hidden';
if (!sw && ns4) document.layers[obj].visibility = 'visible';
}
// End -->
</script>

In the body, use the following:

<div align="center" id="divName">
<input name="Button" type="button" class="button" value="Print Certificate" >
</div>
<img src="image1.gif" width="200" height="81" onMouseOver="show(false,'divName')" onMouseOut="show(true,'divName')">

You can name the id anything you want (and obviously put whatever you need on it - I needed a button and left that bit as an example)
Since you are using the layer as navigation, you may not want to include the onMouseOut="show(true,'divName')" since that makes the layer disappear when your cursor leaves the image.
Truman is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to make a layer visible on rollover?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.41621 seconds with 12 queries