S
Sonnich
Hi!
I just want a single button on a page (without a form) to be disabled
using JS. My problem is to reach the components/elements on the page.
Like this:
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function stopuseraction()
{
alert("test");
document.button1.disabled=true; // something is wrong here.
}
//-->
</SCRIPT>
</head>
<body>
<input type="button" name="button1" value="Yo man!"
onClick="stopuseraction(); ">
</body>
</html>
I just want a single button on a page (without a form) to be disabled
using JS. My problem is to reach the components/elements on the page.
Like this:
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function stopuseraction()
{
alert("test");
document.button1.disabled=true; // something is wrong here.
}
//-->
</SCRIPT>
</head>
<body>
<input type="button" name="button1" value="Yo man!"
onClick="stopuseraction(); ">
</body>
</html>