i am wring a website and i need help with some javascript.
first ill give you the code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type='text/javascript'>
function showdiv(name){
var divname=name;
show();
}
function show(){
document.getElementById(divname).style.display='block';
document.getElementById(divname).style.overflow='visible';
var lastdiv=divname
}
function closediv{
if (lastdiv)
{
document.getElementById(lastdiv).style.display='none';
var lastdiv='';
}
}
</script>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<a href="javascript: showdiv('showdiv');">test</a>
<div id='showdiv' style='background-color: red; width: 500px; margin-left: auto; margin-right: auto; height: 500px; overflow: hidden; display: none;'>
test
</div>
</body>
</html>
now, when i click the test link(which is supposed to make the div pop-up), nothing happens. I figured is because of an error in the javascript. can you help?