resume with JavaScript