fix javascript dropdown error on pages