|
|
 |
Re: FN-FORUM: iframes, was: site check please
date posted 14th May 2007 14:44
[EMAIL REMOVED] wrote:
>> -----Original Message-----
>> From: [EMAIL REMOVED] [EMAIL REMOVED] On Behalf Of Richard
>> Fletcher
>> Sent: 14 May 2007 14:20
>> To: FN-FORUM / [EMAIL REMOVED]
>> Subject: Re: FN-FORUM: iframes, was: site check please
>>
>>
>> Ben Johnson (Neogic) F wrote:
>>> Phil wrote:
>>>> Nice. Just a couple of points though, is $() defined somewhere else as
>>>> something doing getElementById()? And are the three equals signs
>> together
>>>> a typo (on the line "if(sTmp==='')") ?
>>>
>>> $ is a commonly defined (but not built-in) Javascript function that acts
>> as
>>> a shortcut to getElementById().
>> It actually does more. Elements returned by getElementByID are not
>> extended in the way those elements returned by $() are.
>>
>> Using the prototype js this would not work:
>>
>> e=document.getElementByID('somediv');
>> e.hide();
>>
>> This would:
>>
>> e=$('somediv');
>> e.hide();
>>
>> But this last example can be done better if e is not to be used again:
>>
>> $('somediv').hide();
>
> If this is a non-standard function, where is it usually defined? Is there a
> standard implementation of it that everybody uses?
It's one of the functions from the prototype library, defined in my code
in the prototype.js include.
The home page is here:-
http://www.prototypejs.org/
Regards
Richard
--
Artumi Systems, 58 Salmon Street, Sheffield, S11 8DD.
Tel 0114 250 7654, Web http://www.artumi.com
VAT Reg 889 0317 88
|
 |
|