|
-
Apr 22nd, 2002, 04:01 PM
#1
Thread Starter
Frenzied Member
JavaScript: Setting the disabled Flag
I'm trying to set the disabled flag on a input element. If you know of an easier way, please. Othwise, what is wrong with this?
Code:
<html>
<head>
<title>Test Page</title>
<script type="text/javascript">
function foo() {
alert(document.getElementByID("myInput").nodeName);
}
</script>
</head>
<body>
<form name="myForm">
<input id="myInput" type="text" size="8" value="2">
</form>
<p onclick="javascript:foo();">Click Me</p>
</body>
</html>
I can't get it to return nodeName, much less can I try to setAttributeNode, which may not even be what I need to do.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|