i had thought that you could say if(function) function(); or if(element.method) element.method(); to avoid errors, but apparently not - specifically: ive got an array of form elements, on enter pass focus to the next element in the array. if that element can't recieve focus, go the next one in the array. if we've reached the end of the array, start again at the index of the event element and start going down. if it reaches 0 and still nothing, just return false i guess.
initially tried if(target.focus) target.focus(); but that didnt work, so tried checking all the conditions i could think of (disabled, readonly, display, visibility) but that fails if the parent or the parentparent etc. are disabled, hidden, whatnot.