Forum Moderators: open
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Test</title>
<script type="text/javascript">
//<![CDATA[
function change(id, newClass)
{
identity=document.getElementById(id);
identity.className=newClass;
}
//]]>
</script>
<style type="text/css">
div.hidden {
display: none;
}
div.promptshow {
background: #bbb;
display: block;
}
</style>
</head>
<body>
<div>
<a href="#" onclick="change('hiddendiv1', 'promptshow');">Display div 1</a>
<a href="#" onclick="change('hiddendiv2', 'hidden');">Hide div 2</a><div class="hidden" id="hiddendiv1">hide this div</div>
<div id="hiddendiv2">previously hiding div</div></div>
</body>
</html>
- John