No subject


Tue Nov 13 08:16:38 EST 2012


Geoffrey Myers

On Apr 30, 2013, at 7:09 PM, Alex Carver <agcarver+ale at acarver.net> wrote:

> On 4/30/2013 15:58, Jim Lynch wrote:
>> On 04/30/2013 03:26 PM, Geoffrey Myers wrote:
>>> InvertView('o', LinkDiv)
>>> 
>>> Will fail.
>>> 
>>> InvertView() loops through the arg list doing this:
>>> 
>>> arguments[i+1].style.display =
>>> (Arguments[i] == 'o') ? "block" : "none"
>>> 
>>> Fails with: Arguments[i+1].style is undefined.
>> Maybe test?
>> 
>> if(arguments[i+1].style != undefined) {
>>     arguments[i+1].style.display =
>>     Arguments[i] == 'o') ? "block" : "none"
>> }
> 
> if ( arguments[i+1] != null && argments[i+1].style != undefined)
> {
> ...
> }
> 
> Short circuit conditional just to be sure the object exists first before attempting to test a property.
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo



More information about the Ale mailing list