updating javascript, attaching events to a persisting object, not showing widget name until widget is saved