javascript client cod