...

View Full Version : Hide disable scrollbar



snake_eyes
05-15-2007, 10:04 PM
Hello,

May anyone teach me how do I can hide (disable) scroll bar when I click on "show form" although show form is link.

Please note: is this code ok?



<head>
<title>Show Hide Scrollbars</title>
<script name="Detect Browser" language="Javascript">
var detect = navigator.userAgent.toLowerCase();
var browser,thestring;

if (checkIt('msie'))
{
browser = "Internet Explorer";
}
else if (!checkIt('compatible'))
{
browser = "Netscape Navigator";
}
else browser = "An unknown browser";

function checkIt(string)
{
place = detect.indexOf(string) + 1;
thestring = string;
return place;
}
</script>
<script
name="Add and Remove Scroll Bars" language="Javascript">
function noScrollIE()
{
document.body.scroll="no";
}
function scrollIE()
{
document.body.scroll="yes";
}
function noScrollNS()
{
document.width= window.innerWidth;
document.height=window.innerHeight;
}
function scrollNS()
{
document.width=1000;
document.height=1000;
}
</script>
<script "Do the work" language="Javascript">
function removeScrollBars()
{
if (browser = "Internet Explorer")
{
noScrollIE();
}
else if (browser = "Netscape Navigator")
{
noScrollNS();
}
}
</script>
</head>

<body onload="removeScrollBars()">
<a href="javascript:noScrollIE();">IE Scrollbars Off</a><br>
<a href="javascript:scrollIE();">IE Scrollbars On</a><br>
<a href="javascript:noScrollNS();">NS Scrollbars Off</a><br>
<a href="javascript:scrollNS();">NS Scrollbars On</a><br>
</body>

Regards



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum