javascript sama view