lucy24 - 9:58 pm on Mar 18, 2013 (gmt 0)
I assume you've discarded the option of feeding the two IDs to the function in alternation. Shouldn't place too much of a strain on the server, and unless your users are on dialup I can't imagine they would see the difference.
Alternately: Would getElementsByName (plural) work? Generally you think of "name" as retro and outdated compared to "id", but this is one situation where the two things simply do different things.