updated title in javascript