@crushmeguyOct 03.2006 — #What exactly do you want to happen? Do you want blah to be the returned objects or do you want blah to be 'true' if both elements exist?
@CharlesOct 03.2006 — #var blah = document.getElementById('a1') && document.getElementById('a2');With a && operator the left operand is evaluated. If it evaluates to false then it is returned. If it evaluates to true than the right side is returned.alert (false && 'foo') // alerts 'false'var blah = document.getElementById('a1') || document.getElementById('a2');However the || operator returns the first operand if true but the second if it is false.
I'm thinking that you want "||", that you want a2 if a1 is not found. But the question is, What on Earth are you trying to accomplish?