|
-
Mar 28th, 2001, 03:36 PM
#1
Thread Starter
Frenzied Member
Okay... I have a series of document objects
Code:
<table>
<tr id='objRow'></tr>
<tr id='objRow'></tr>
<tr id='objRow'></tr>
<tr id='objAnotherRow'></tr>
<tr id='objAnotherRow'></tr>
<tr id='objAnotherRow'></tr>
<tr id='objDifferentRow'></tr>
<tr id='objDifferentRow'></tr>
<tr id='objDifferentRow'></tr>
</table>
I have some onClick events that pass the name of one of these objects. Let's say I want to make them hide.
Code:
<script language=JavaScript>
function hide(x) {
for (var i = 0; i < x.length; i++) {
x\[i\].style.display = "none";
}
}
</script>
Well, it is looking for an object called x. I want to anonymously refer to the object, using x. How can I do this?
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
|