removing hard-coded database ids from javascript