Den løsning ser heller ikke ud til at virke
min kode ser sådan ud
<SCRIPT LANGUAGE="JavaScript">
<!--
function showhide(Click_Menu, Content)
{
var contentbox = document.getElementById("Content");
var menubox = document.getElementById("Click_Menu");
if (Click_Menu.style.display == "none")
{
menubox.style.display = "";
contentbox.style.marginRight = "220px";
}
else
{
menubox.style.display = "none";
contentbox.style.marginRight = "0px";
}
}
-->
</script>
og hele kilden:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="style/main.css" rel="stylesheet" type="text/css" />
<SCRIPT LANGUAGE="JavaScript">
<!--
function showhide(Click_Menu, Content)
{
var contentbox = document.getElementById("Content");
var menubox = document.getElementById("Click_Menu");
if (Click_Menu.style.display == "none")
{
menubox.style.display = "";
contentbox.style.marginRight = "220px";
}
else
{
menubox.style.display = "none";
contentbox.style.marginRight = "0px";
}
}
-->
</script>
</head>
<body>
<div id="topmenu">
</div>
<!-- Login block -->
<span id="loginblock">
Login
<form action="" method="post">
<input name="username" type="text" /><br />
<input name="password" type="password" />
<input name="loginbtn" type="submit" value="Login" />
</form>
</span>
<div id="topgradient"><img src="images/logo_gradient.png" alt="Digitalpath logo"/></div>
<div id="topstripes"></div>
<!-- Left block wrapper -->
<div id="leftblock">
<div id="menu">
faef<br />
<br /><br /><br /><br /><br /><br /><br /><br /><br />
</div>
<br />
<!-- End left block wrapper -->
</div>
<!-- Right block wrapper -->
<div id="rightblock">
<div id="marginWrapper">
<!-- Top searchbar -->
<div id="searchbar">
js
</div>
<!-- News block -->
<div id="newsblock">
<h1>Overskrift 1</h1>
<p><a href="#" onclick="showhide(loginblock, marginWrapper)">show/hide</a><br /></p>
</div>
<div id="latestblock">
</div>
<!--End right and margin wrapper -->
</div>
</div>
</body>
</html>
Indlæg senest redigeret d. 25.10.2006 02:13 af Bruger #6528