changing active tab to also work through javascript