changes php command to javascript