Fixed bug in JS

 where $$('input[name^=product]') could return nothing in certain environments.

Unsure about line 36