Closed Thread Icon

Topic awaiting preservation: Simple Hide Show Layer (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=23054" title="Pages that link to Topic awaiting preservation: Simple Hide Show Layer (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Simple Hide Show Layer <span class="small">(Page 1 of 1)</span>\

 
Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

posted posted 08-25-2004 03:13

Hello,

Trying to make a simple Jscript function that hides and shows a layer. My intent is for the users to roll-over image buttons that trigger individual snippets of text to display in a centralized div area. Was trying to use the setAttribute method, but not working. Here was a simple test I tried to create:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Back to School</title>
<style type="text/css">
<!--
#testme {
position:absolute;
margin:400px 0 0 0;
}

#MY_TEST_DIV {
color: #ffffff;
position:absolute;
margin:200px 300px 0 0;
height: 200px;
}

.display {
display:normal;
}
.nodisplay {
display:none;
}
-->
</style>
<script language="JavaScript" type="text/javascript">
<!--
function test() {
MY_TEST_DIV.setAttribute('class','display');
}
//-->
</script>


</head>
<body background="schoolintropage.jpg"/>
<center><i>Coming Soon!</i></center>
<div id="MY_TEST_DIV" class="nodisplay">this is just a test this is just a test this is just a test this is just a test</div>
<button id="testme" onmousemove="test();">Float Over Me</button>
</body>
</html>

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 08-25-2004 03:27

This FAQ is what you want - http://www.ozoneasylum.com/5260
But unfortunately the page that it links to is no longer there.

Perhaps someone else here has a copy of Mr. Max's beautiful little script around still?

DmS
Maniac (V) Inmate

From: Sthlm, Sweden
Insane since: Oct 2000

posted posted 08-25-2004 11:02

Take a look here at PPK's site, that's where I saw it first:

http://www.quirksmode.org/index.html?/js/dhtmloptions.html

/Dan

{cell 260}
-{ a vibration is a movement that doesn't know which way to go }-

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 08-25-2004 18:02

I found a test page where I had uses Mr. Max's script -

http://www.in-dented.com/temp/drop_down_menu.html

I altered it slightly to be a drop-down-menu, but the couple of lines I added are clearly marked, and if you remove them, it should do what you want.

Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

posted posted 08-26-2004 09:27

Good stuff! Thank you ; )

« BackwardsOnwards »

Show Forum Drop Down Menu