rollovers are not dependent on layers. you can use the NAME attribute of the
IMG tag. then your javascript funtion will assign a different value to that
object name on two different events: onMouseOver and onMouseOut. that
creates the rollover effect. yes, you could have the different images as
layers and toggle between visible and hidden DIV tags, but the former will
work on 3.x browsers whereas layers is a 4.x feature only.
here's the javascript code for the 3.x-6.x-friendly version:
<SCRIPT LANGUAGE="Javascript">
version = "";
browser = navigator.appName;
browser_version = parseInt(navigator.appVersion);
if (browser == "Netscape" && browser_version >= 3) version = "n3+";
if (browser == "Microsoft Internet Explorer" && browser_version >=
3) version = "n3+";
function rollover(imgDocID,imgObjName) {
document.images[imgDocID].src=eval(imgObjName + ".src")}
if (version =="n3+") {
{default_image} = new Image;
{default_image}.src = {default_image}.gif";
{rollover_image} = new Image;
{rollover_image}.src = "{rollover_image}.gif";
</SCRIPT>
here's the HTML code:
<A HREF="some_page.cfm" ONMOUSEOVER="rollover('{image_name}',
'{rollover_image}');" ONMOUSEOUT="{rollover('{image_name}',
'{default_image}');}"><IMG SRC="{default_image}.gif" BORDER="0"
NAME="{image_name}"></A>
just change everything within {} to whatever you need. omit the {} though.
;)
--dylan
-----Original Message-----
From: Robert Everland [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 05, 2001 12:27 PM
To: CF-Community
Subject: Photoshop 6 question
I have had the lucky chore of doing graphic design work, does anyone
know if you need to make each rollover a different layer or you can have 2
layers and refrence the rollover without it affecting everything else.
Robert Everland III
Dixon Ticonderoga
Web Developer Extraordinaire
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists