connecting javascript