View Full Version : Javascript help
BananaMaster
October 12th, 2007, 14:17
Hi
Can someone send me a JS code which allows you to show a 'hidden' form when a link is created, like on http://www.izihost.org/
krakjoe
October 12th, 2007, 14:38
<html>
<head>
<script language="javascript">
function SwitchBar( )
{
var current = document.getElementById('TopBar').style.display;
document.getElementById('TopBar').style.display = current == 'none' ? '' : 'none';
}
</script>
<style type="text/css">
body{
margin: 0px;
padding: 0px;
}
</style>
</head>
<body>
<div id="TopBar" style="display:none;position:absolute;background:blue;color:white;w idth:100%;">
The bar on the top of the page<br />
<a href="#" onclick="javascript:SwitchBar( )">Hide Me</a>
</div>
Some text<br />
Some text<br />
Some text<br />
Some text<br />
Some text<br />
Some text<br />
Some text<br />
Some text<br />
Some text<br />
Some text<br />
<a href="#" onclick="javascript:SwitchBar( )">Show Thingy</a>
</body>
</html>
That page uses special effects libraries, take your pick ...
BananaMaster
October 12th, 2007, 15:11
<html>
<head>
<script language="javascript">
function SwitchBar( )
{
var current = document.getElementById('TopBar').style.display;
document.getElementById('TopBar').style.display = current == 'none' ? '' : 'none';
}
</script>
<style type="text/css">
body{
margin: 0px;
padding: 0px;
}
</style>
</head>
<body>
<div id="TopBar" style="display:none;position:absolute;background:blue;color:white;w idth:100%;">
The bar on the top of the page<br />
<a href="#" onclick="javascript:SwitchBar( )">Hide Me</a>
</div>
Some text<br />
Some text<br />
Some text<br />
Some text<br />
Some text<br />
Some text<br />
Some text<br />
Some text<br />
Some text<br />
Some text<br />
<a href="#" onclick="javascript:SwitchBar( )">Show Thingy</a>
</body>
</html>
That page uses special effects libraries, take your pick ...
Thanks I tested it and it works, So i'm gonna add to to where I want it and that. THANKS!
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.