For the last hour and a half I've trace Javascript calls in a Magento shop I'm building, because I have the strange effect that, when checking out, I can not leave page 2 (shipping address) of the onepage checkout, unless I switch from "send to this address" to "send to another address".
I've traced it down to this piece of javascript code in form.js, residing in Regionupdater.setMarkDisplay (line 254 ff.)
Since I'm a jquery man myself I'm not really in the loop with prototype functionality but I'm assuming .up and .down are practically what jquery does with .parent(s) and .children()?!
elem = $(elem);
var labelElement = elem.up(0).down('label > span.required') ||
elem.up(1).down('label > span.required') ||
elem.up(0).down('label.required > em') ||
elem.up(1).down('label.required > em');
elem is the region select field in the form. I'm assuming it's trying to find the label for this field (which exists). But both the "elem.up(0)" fragments apparently throw an
[Exception... "An invalid or illegal string was specified" code: "12" nsresult: "0x8053000c (NS_ERROR_DOM_SYNTAX_ERR)"]
I've no idea what triggers this.