I have an input element with id billing:postcode
. The Prototype $() selector is unable to select this element as described in this ticket.
I found this solution for the same problem in jQuery. I can't get it to work in Prototype. I tried:
var element = document.getElementById('billing:postcode');
Element.extend(element);
element.invoke(...);
and:
var element = document.getElementById('billing:postcode');
$(element).invoke(...);
Both don't work: Uncaught TypeError: Object #<HTMLInputElement> has no method 'invoke'
I know I can get the element with the CSS selector like this:
$$('#billing\\:postcode')
But I want to use getElementById