[thelist] dHtml <td> contents

Joshua OIson joshua at alphashop.com
Wed Nov 15 15:32:42 CST 2000


Try changing the

    document.all.eCt.innerHTML = '<%= tdText %>';

to:

    document.all[eCt].innerHTML = '<%= tdText %>';


-joshua

----- Original Message -----
From: "Tab Alleman" <talleman at autobex.com>
To: <thelist at lists.evolt.org>
Sent: Wednesday, November 15, 2000 1:16 PM
Subject: RE: [thelist] dHtml <td> contents


> Ok, I'm going in that direction, and it looks pretty good for a while, but
> now I've run into this:  I need to send the id of <td> to the javascript
> function (cuz I lied:  I don't really just have 2 <td>'s.)
>
> So I've got something like this in my select's onchange:
> onchange=UpdateTD(this,'TV1')
>
> and my function looks like this (at the moment):
>
> function UpdateTD(eType,eCt)
> {
> alert(eType.selectedIndex + ', ' + eCt);
> if (eType.selectedIndex == 0)
> {
> document.all.eCt.innerHTML = '<%= tdText %>';
> }
> }
>
> What happens when I select the first element and trigger the onchange, the
> alert works as expected: "0, TV1"
> But next I get an error that "document.all.eCt is not an Object"..
>
> erm.. how do I get it to interpret eCt as the value I passed it, and not
> literally "eCt"?
>
> I love JavaScript.  :)






More information about the thelist mailing list