basic javascript for registry