basic javascript client