basic javascript talking back and forth