Re: Browsers browsers
- From: "Dave Anderson" <GTSPXOESSGOQ@xxxxxxxxxxxxx>
- Date: Sun, 22 May 2005 13:42:50 -0500
I wrote:
>> ...way to redefine a function, so that for example if I call
>> document.all
>> it gets interpreted as
>> document.getElementByID
>
> document.all is not a function, it is a collection. As a collection,
> the proper way to use it is with square brackets:
>
> document.all["myElement"].style.display = "none"
This was an incomplete utterance on my part. I meant to point out further
that document.getElementById is a method, and as such is called with
parentheses:
document.getElementById("myElement").style.display = "none"
So suppose you do something like this:
document.all = document.all || document.getElementById
What does the non-doc.all browser do when it sees this?
document.all["myElement"].style.display = "none"
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
.
- References:
- Browsers browsers
- From: Dave
- Re: Browsers browsers
- From: McKirahan
- Re: Browsers browsers
- From: Trevor L.
- Re: Browsers browsers
- From: Kieren Evans
- Re: Browsers browsers
- From: Kieren Evans
- Re: Browsers browsers
- From: Trevor L.
- Re: Browsers browsers
- From: Dave Anderson
- Browsers browsers
- Prev by Date: Serverside JScript and language of Windows OS
- Next by Date: Re: Browsers browsers
- Previous by thread: Re: Browsers browsers
- Next by thread: Re: Browsers browsers
- Index(es):
Relevant Pages
|
Loading