updated javascript code on extendmembership