Linked create button in javascript