add Java script code for test